Skip to content

Non linear Regression: "singular gradient matrix at initial parameter estimates"

5 messages · Peter Ehlers, Mario Valle, Felix Nensa

#
On 2011-04-11 13:29, Felix Nensa wrote:
Take out p3; it's redundant.

Peter Ehlers
#
Use a more realistic starting point instead of the default one:

fit <- nls(yeps ~ p1 / (1 + exp(p2 - x)) * exp(p4 * x), 
start=list(p1=410,p2=18,p4=-.03))

This works for me:
 > fit
Nonlinear regression model
   model:  yeps ~ p1/(1 + exp(p2 - x)) * exp(p4 * x)
    data:  parent.frame()
        p1        p2        p4
199.48276  16.28664  -0.01987
  residual sum-of-squares: 560.6

Number of iterations to convergence: 5
Achieved convergence tolerance: 5.637e-07

Ciao!
                         mario
On 12-Apr-11 18:01, Felix Nensa wrote: