[R] Exponential fit of form y=exp(a*x) and not of form y=l*exp(a*x)
Ben Bolker
bbolker at gmail.com
Sun Oct 23 19:02:24 CEST 2011
Henri Mone <henriMone <at> gmail.com> writes:
> 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")
Use an algorithm other than "plinear", I think (admittedly this
is not at all clear from ?nls -- you would really have to go to the
references to find out).
More information about the R-help
mailing list