Hello there, I am trying to use R function NLS to analyze my data and one of the examples in the documentation is -
## the nls() internal cheap guess for starting values can be sufficient: x <- -(1:100)/10 y <- 100 + 10 * exp(x / 2) + rnorm(x)/10 nlmod <- nls(y ~ Const + A * exp(B * x), trace=TRUE) plot(x,y, main = "nls(*), data, true function and fit, n=100") curve(100 + 10 * exp(x / 2), col=4, add = TRUE) lines(x, predict(nlmod), col=2) However, when I try to execute this - I get the following error- Error in nls(y ~ Const + A * exp(B * x), trace = TRUE) : step factor 0.000488281 reduced below 'minFactor' of 0.000976562 In addition: Warning message: In nls(y ~ Const + A * exp(B * x), trace = TRUE) : No starting values specified for some parameters Can someone propose how I can fix this error? Thanks. Diviya [[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.