ROS Mathieu <mim78@cict.fr> writes:
> On Thu, 22 Jul 1999, E. Conrad Lamon III wrote:
>
> >
> > While trying to fit a nonlinear model using nls( ), I get an error message
> > that says I have a singular gradient matrix. I am not sure what causes
> > this problem. Should I try different initial values of the parameters, or
> > is the problem something else?
>
> yes, you have to put different initial values, but I'd like someone who
> 'knows' to tell me why this message appears when the initial values
> are not close enough to the 'real' ones ?
I'm not sure what your question means. The reason that the message
appears is because the gradient matrix has become computationally
singular and it is not possible to calculate the increment for the
next iteration.
The easiest way to determine what is happening within the nls function
is to add the argument
trace = TRUE
to the nls function call. With that argument you get a line printed
out at each iteration giving the current residual sum-of-squares, the
convergence criterion, and the parameter values. Most of the time the
message about singular gradients indicates that one or more of the
parameters are heading off to peculiar values, such as infinity.
One way to help convergence in nls problems is to eliminate
conditionally linear parameters with the
algorithm = "plinear"
argument. When using this you must re-write the model function as
described in the documentation.
Choosing a good parameterization and reasonable starting estimates is
also very helpful.
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|