Skip to content

fitting simple y(x) data

2 messages · Timur Elzhov, Ben Bolker

#
Dear R experts!

I have the y(x) data (length(y) == length(x) == 10,000)
and I want to fit it with function

  exp(-a1 * x) + exp(-a2 * x)

a1, a2 -- are parameters to be estimated.

What the "right" way to do it?
Can I transform data to something so that linear model could be used?
Or, I must use a non-linear model, definitely?

Thank you very much.


--
WBR,
Timur.


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
This is definitely nonlinear.  nls() is what you need.
On Sat, 2 Nov 2002, Timur Elzhov wrote: