Skip to content
Back to formatted view

Raw Message

Message-ID: <A4E5A0B016B8CB41A485FC629B633CED4A31450BF1@GOLD.corp.lgc-group.com>
Date: 2013-01-08T13:26:03Z
From: S Ellison
Subject: (no subject)
In-Reply-To: <50E6ECA8.8070908@locean-ipsl.upmc.fr>

>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}}