Skip to content
Prev 319510 / 398506 Next

question about nls

On Thu, Mar 14, 2013 at 5:07 AM, meng <laomeng_3 at 163.com> wrote:
The gradient is singular at your starting value so you will have to
use a better starting value.  If d = 0 then its linear in log(y) so
you can compute a starting value using lm like this:

lm1 <- lm(log(y) ~ x, DF)
st <- setNames(c(coef(lm1), 0), c("a", "b", "d"))

Also note that you are trying to fit a model with 3 parameters to only
4 data points.

--
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com