[R] Exponential fit of form y=exp(a*x) and not of form y=l*exp(a*x)

Henri Mone henriMone at gmail.com
Sun Oct 23 18:50:32 CEST 2011


Dear R Users, Beginners and Experts,

I want to fit to my data an exponential function with following functional form:
y=exp(a*x)

I used the function "nls" but this gives me exponential fits with
following functional form:
y=l*exp(a*x)

With "l" being an scaling factor. What do I need to change in my R code?

t.dataFitModel=nls(t.dataForFitY ~exp(a*t.dataForFitX),
data=t.dataForFit, start=list(a = 0.01242922), trace=TRUE, algorithm =
"plinear")



Thanks in advance and a nice weekend,
Henri



More information about the R-help mailing list