On Thu, Jul 12, 2012 at 3:02 PM, Felipe Carrillo
<mazatlanmex...@yahoo.com> wrote:
> Thanks Bert, I increased the  number of iterations:
>
> M_model <- nls(weight ~ alpha + 
> beta*exp(gamma*week),control=nls.control(maxiter=200), weightData,
>              start = c(alpha = 0.0, beta = 1, gamma = 0.2), trace = TRUE)
>
> But now the 'start' argument seems to be the problem.
> Looking at the model coefficients:
>   alpha          beta         gamma
> -49.108008320  52.394172340   0.005269907
> If I change the alpha and beta values inside start..I still get the error...

Try using the plinear algorithm:

nls(weight ~ cbind(1, exp(gamma*week)), weightData, start = list(gamma
= 0.2), alg = "plinear")


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

______________________________________________
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.

Reply via email to