R-beta: nonlinear fitting

Bill Simpson wsimpson at uwinnipeg.ca
Thu Mar 12 16:36:15 CET 1998


Thanks very much Douglas for the pointer to nlm.
Maybe the "Notes on R" maintainer can add at least a mention of nlm in the
section on nonlinear fitting?

I never did nonlinear fitting in S-Plus before, so I have nothing to
unlearn, but I was hoping someone could show me how to do a least squares
fit with nlm.

example:
x<-c(1,2,3,4,5,6)
y<-.3*x^-.6 +.2
y<-y+rnorm(6,0,.01)

Please show me how to fit the model
y=a*x^b + c
by least squares.  I would like parameter estimates plus the standard
error for each param.

(This example could replace the current nonlinear fitting section in
"Notes on R")

Thanks very much for any help!

Bill Simpson

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list