[R] nls

Schatzi adele_thompson at cargill.com
Mon Feb 28 19:54:34 CET 2011


I am running the following nls equation. I tried it with data that excel was
fitting and got the error: 
singular gradient matrix at initial parameter estimates
I thought it was due to a low number of points (6), but when I create a
dataset, I get the same problem. If I remove the parameter "a," then it can
find a solution. Does anyone know what I can do to fit this model?

vardata<- rnorm(73,mean=0,sd=5)
x<-0:72
a<-1
b<-50
k<-0.05
l<-5
startt<-c(a,b,k,l)
yf<-a+b*(1-exp(-k*(x-l)))
y<-yf+vardata

nmodel<-nls(y~a+b*(1-exp(-k*(x-l))),
start=list(a=1,b=50,k=0.05,l=5))

-- 
View this message in context: http://r.789695.n4.nabble.com/nls-tp3328485p3328485.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list