Hi, I have a problem fitting the following Weibull Model to a set of data. The model is this one: a-b*exp(-c*x^d) If I fitted the model with CurveExpert I can find a very nice set of coefficients which create a curve very close to my data, but when I use the nls.lm function in R I can't obtain the same result. My data are these: X Y 15 13 50 13 75 9 90 4
With the commercial software I obtain the following coefficients: Weibull Model: y=a-b*exp(-c*x^d) Coefficient Data: a = 1.31636909714E+001 b = 7.61325570579E+002 c = 2.82150000991E+002 d = -9.23838785044E-001 For fitting the Levenberg-Marquardt in R I'm using the following lines: pS<-list(a=1,b=1,c=1,d=1) model<-function(pS,xx){pS$a-pS$b*exp(-pS$c*xx^-pS$d)} resid<-function(observed,pS,xx){observed-model(pS,xx)} lin<-nls.lm(pS,resid,observed=Y,xx=X) Why I can't obtain the same results? Many thanks in advance, Fabio Mr. Fabio Veronesi Ph.D. student Cranfield University e-mail: f.veron...@cranfield.ac.uk [[alternative HTML version deleted]] ______________________________________________ R-help@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.