>I am using the nls function and it stops because the number of iterations >exceeded 50, but i used the nls.control argument to allow for 500 >iterations. Do you have any idea why it's not working?
Not entirely. But I do see in the code for SSgompertz that SSgompertz calls nls _without_ specifying maxiter. So I suspect the error may be coming from the selfstart step which is ignoring your control argument. You could check that by adding trace=TRUE to the nls call; I suspect you may see no iterations at all if the self-start fails before nls itself gets going. If that's so, the easiest way I can see round that (barring alrternative packages I've not heard of) is to copy the SSgompertz code to a text file (say 'SSgompertz' at the command line without () to see the code), create your own SSgompertz function from it, add a big maxiter in its internal call and use your version. Failing that, use good starting parameters (usually I fool around with plots until something looks close enough to at least start) for a roll-your-own gompertz model. S Ellison ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}} ______________________________________________ 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.