[R] nls model singular gradient matrix parametrization

Mihai Nica m_nica at hotmail.com
Fri Jun 2 12:25:33 CEST 2006

Yes! Now I can see it, it's so evident... Thank you so much,

Mihai Nica, ABD
Jackson State University
ITT Tech Instructor
170 East Griffith Street G5
Jackson, MS 39201
601 914 0361

The least of learning is done in the classrooms.
  - Thomas Merton

----Original Message Follows----
From: Prof Brian Ripley <ripley at stats.ox.ac.uk>
To: Mihai Nica <m_nica at hotmail.com>
CC: r-help at stat.math.ethz.ch
Subject: Re: [R] nls model singular gradient matrix parametrization
Date: Fri, 2 Jun 2006 07:03:02 +0100 (BST)

Your model is over-parametrized: d1*exp(-gt) gives two parameters for one 
constant.  As a result, the least-square surface is flat in one direction, 
and the gradient matrix is singular.

If this is the model you intended, you can simplify it by dropping d1.
It is also partially linear (d) so it should be possible to get 
method="plinear" to work.

On Thu, 1 Jun 2006, Mihai Nica wrote:

>I am having a very hard time with a nonlinear regression. The last chance 
>is that maybe somebody can spot something wrong… The data and the model are 
>described below:
>number of observations = 3030
>y = [0,…,~16]
>D1969 = [.16,…,~70,000]
>>mod=nls(log(D1969)~d-log(1+d1*exp(-gt+g1*y)), start=list(d=11, d1=750000, 
>>gt=14, g1=.9), trace=TRUE, data=pidg)
>Error in nlsModel(formula, mf, start) : singular gradient matrix at initial 
>parameter estimates
>I ran several variants, changing the start values. However the graph with 
>these starting values is almost identical with what is obtained with the 
>real data (although it is rather nonlinear)… I am missing something, but 
>can’t figure out what. If anybody has a little time and patience, any 
>advice would be really really appreciated.
>Mihai Nica, ABD
>Jackson State University
>ITT Tech Instructor
>170 East Griffith Street G5
>Jackson, MS 39201
>601 914 0361
>The least of learning is done in the classrooms.
>- Thomas Merton

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-help mailing list