[R] nls help

Schatzi adele_thompson at cargill.com
Mon Feb 28 20:20:06 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-help-tp3328521p3328521.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list