[R] "Error : singular gradient matrix at initial parameters estimates"
Ben Bolker
bbolker at gmail.com
Tue Feb 15 14:14:02 CET 2011
Marie didier <mariedidier1 <at> gmail.com> writes:
> I am a fresh user of R and I already face to problems that I don't
> understand.
> In the use of the function nls(), I systematically have an error message :
> "Singular gradient matrix at initial parameters estimates".
> I tried to use nls() on a set of data that I subseted from a bigger matrix
> data. I wish to fit a gaussian on these points (spectrum) and draw this fit
> on the plot.
> Is this possible? Why do I always have this error message when using nls() ?
>
> Thank you for your answers, and don't make fun of me :) because, as I said,
> I am a fresh novice :)
>
We won't make fun of you, but we will chide you for not giving us
enough information to help you solve your problem. "Singular gradient
matrix at initial parameter estimates" means that there is a 'flat' or
nearly flat direction in parameter space at the point where you tried
to start the optimization. This can be a symptom of:
* a model with unidentifiable (i.e. perfectly correlated) parameters
* bad choices of starting parameters
Please read the Posting Guide (referenced at the bottom of every post)
and try again. What are the *specific* R commands you are trying to run?
Can you give us a reproducible example?
Ben Bolker
More information about the R-help
mailing list