Thank you! Now it's working.
Peter Dalgaard schrieb:
Jonas Weickert wrote:
Hi,
I want to do a biexponential Fit, i.e.
y ~ A1*exp(k1*x) + A2*exp(k2*x)
Is this possible? I tried nls() but it stopped with several
(different) errors. I'm using y and x as simple vectors and the
formula for nls() exactly as mentioned above.
Yes, it is possible, with some reservations. There is even a
self-starting model for it (SSbiexp), at least if k1,k2 are negative.
The reservations are that you need good data and good starting values
for the fit. The model is theoretically unidentifiable because you can
switch 1 and 2 and get the same model, which becomes an issue if you
start too fra from the optimum. Worse, if k1 and k2 are similar, the
whole system becomes ill-conditioned. There's a rule of thumb requiring
a factor of 5 or more between k1 and k2, for pharmacokinetic applications.
Thanks a lot!
Jonas
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.