dear R experts: I am trying to orient myself using nls(). so, I am
just trying to copy and adapt an example in the nls() function:
d= data.frame( y= runif(10), x= runif(10) )
nls( y ~ 1/(1+x), data = d, start= list(x=0.5,y=0.5), trace=TRUE)
Error in n%%respLength : non-numeric argument
See the nls help page:
Arguments
formula a nonlinear model formula including variables and parameters.
and you have
y ~ 1/(1+x)
which does not seem to match the requirement of the help page.
What are the unknowns for which you were hoping nls would solve??
On Sat, 23 Dec
duh! thanks.
summary(nls( y ~ 1/(1+b*x), data = d, start= list(b=0.5)))
works, of course.
/iaw
On 12/23/06, Charles C. Berry [EMAIL PROTECTED] wrote:
See the nls help page:
Arguments
formula a nonlinear model formula including variables and parameters.
and you have