I am trying to fit very simple exponential decay using R. However, I have a problem achieving that task using R.
<code>koff_dat <- tribble(
~incu_time, ~perc_binding,
179.20634920634922, 3.94736842105263,
120.47619047619048, 10.197368421052616,
91.11111111111111, 18.09210526315789,
60.95238095238095, 35.526315789473685,
45.87301587301587, 31.25,
30.793650793650798, 55.921052631578945,
16.50793650793652, 68.75,
0.6349206349206398, 99.34210526315789
)
fit2 <- nls(perc_binding ~ exp(-k*incu_time),
data = koff_dat,
start = list(k = 0.001))
plot(koff_dat$incu_time, koff_dat$perc_binding)
lines(koff_dat$incu_time, predict(fit2))
</code>
<code>koff_dat <- tribble(
~incu_time, ~perc_binding,
179.20634920634922, 3.94736842105263,
120.47619047619048, 10.197368421052616,
91.11111111111111, 18.09210526315789,
60.95238095238095, 35.526315789473685,
45.87301587301587, 31.25,
30.793650793650798, 55.921052631578945,
16.50793650793652, 68.75,
0.6349206349206398, 99.34210526315789
)
fit2 <- nls(perc_binding ~ exp(-k*incu_time),
data = koff_dat,
start = list(k = 0.001))
plot(koff_dat$incu_time, koff_dat$perc_binding)
lines(koff_dat$incu_time, predict(fit2))
</code>
koff_dat <- tribble(
~incu_time, ~perc_binding,
179.20634920634922, 3.94736842105263,
120.47619047619048, 10.197368421052616,
91.11111111111111, 18.09210526315789,
60.95238095238095, 35.526315789473685,
45.87301587301587, 31.25,
30.793650793650798, 55.921052631578945,
16.50793650793652, 68.75,
0.6349206349206398, 99.34210526315789
)
fit2 <- nls(perc_binding ~ exp(-k*incu_time),
data = koff_dat,
start = list(k = 0.001))
plot(koff_dat$incu_time, koff_dat$perc_binding)
lines(koff_dat$incu_time, predict(fit2))
As you can tell from there the fit is very off for k. pleas advise