[R] nls problem? Error message, Why so?
dave qwertyu
qwertyu2000us at yahoo.com
Mon Oct 28 21:46:14 CET 2002
Dear R's:
Thanks for the responses to my question on how to
start a nonlinear square fitting. Now I encountered
another problem and wonder if I did anything wrong or
the algorithm by R has some difficulty?
My data:
p theta
0.0 0.5
45.58 0.49
96.9 0.46
150.0 0.42
204.0 0.38
266.7 0.34
346.4 0.3
458.3 0.26
635.9 0.22
979.8 0.18
1990.0 0.14
7998.0 0.11
Then I did:
attach(mydata)
library(nls)
model <- nls( theta ~ thetar + (thetas - thetar)/(1 +
(alfa * p)^n)^(1-1/n),
data = mydata,
start = list( thetar = 0.065, thetas
= 0.41, alfa = 0.075, n = 1.89))
I got this error message:
Error in numericDeriv(form[[3]], names(ind), env) :
Missing value or an Infinity produced when
evaluating the model
The data and initial guess should be sound and I was
able to fit the model with some fortran program. I
just wonder how to perform the analysis by using R?
Any insights/comments, thanks a lot in advance!
Dave
__________________________________________________
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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