Skip to content
Prev 171183 / 398502 Next

Odp: An error in fitting a non linear regression

Hi

r-help-bounces at r-project.org napsal dne 20.02.2009 11:21:26:
teh
returns
With b=0.05 it will converge, however the model seems to be wrong.

depth <--c(5,15,25,35,45,55,65)
y<-c(0.687900000, 0.845550000, 0.405416667, 0.152766667, 0.033100000, 
0.031400000,0.005183333)
plot(depth,y)
nreg<-nls(y~a*exp(-b*depth), start=list(a=1, b=0.05))
lines(depth, predict(nreg))

Regards
Petr
what
http://www.nabble.com/An-error-in-fitting-a-non-
http://www.R-project.org/posting-guide.html