[R] nls help

From: Schatzi <adele_thompson_at_cargill.com>
Date: Mon, 28 Feb 2011 11:20:06 -0800 (PST)


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.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 28 Feb 2011 - 20:56:48 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 28 Feb 2011 - 21:10:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive