Greets,

I'm trying to learn to use nls and was running the example code for an exponential model:

> x <- -(1:100)/10
> y <- 100 + 10 * exp(x / 2) + rnorm(x)/10
> nlmod <- nls(y ~  Const + A * exp(B * x))
Error in B * x : non-numeric argument to binary operator
In addition: Warning message:
In nls(y ~ Const + A * exp(B * x)) :
  No starting values specified for some parameters.
Initializing ‘Const’ to '1.'.
Consider specifying 'start' or using a selfStart model

Presumably, the code should work if it is part of an example on the help page. In perusing various help forums for similar problems, it also appears that others believe this syntax should work in the model formula.

Any ideas?

Perhaps also, a pointer to a comprehensive and correct document that details model formulae syntax if someone has one?

Thanks & Best Regards,
Steven



	[[alternative HTML version deleted]]

