[R] Complicated nls formula giving singular gradient message

dave fournier otter at otter-rsch.com
Wed Dec 22 12:00:21 CET 2010


I don't Think that viewing lack of convergence by some R routine
as a uuseful tool for diagnosing model or data inadequacy is a very 
useful approach. It is far better to fit the model. Then standard
techniques can be employed to investigate these matters. For the
model considered here there are 5 parameters and 96 observations.
So a priori no reason to suspect that the data are insufficient.
So where lies the problem?  Fitting the model and using the very
accurate Hessian approximation provided by AD Model Builder
provides some immediate clues. The eigenvalues of the Hessian are

3.943982727e-08    104.6301825    150.7527476    203.0449889    59736.68735

so the condition number is about 1.e+13.  With such a badly scaled
problem it is difficult to fit with finite difference approximations
to the derivatives.  The approximate std devs of the parameter
estimates are

       index   name   value      std dev
        1   NS     1.1254e-02 7.1128e-03
        2   LogKi -8.8933e+00 8.2411e-02
        3   LogKi -5.2005e+00 9.2179e-02
        4   LogKi -7.2677e+00 7.7047e-02
        5   BMax   2.1226e+05 5.1699e+03

so there is no initial indication  that the parameter estimates
are badly determined.



More information about the R-help mailing list