[R] Non linear regression - Von Bertalanffy Growth Function - "singular gradient matrix at initial parameter estimates"

ProfJCNash
2015-08-19T13:11:25Z

Packages nlmrt or minpack.lm use a Marquardt method. minpack.lm won't
proceed if the Jacobian singularity is at the starting point as far as
I'm aware, but nlxb in nlmrt can sometimes get going. It has a policy
that is aggressive in trying to improve the sum of squares, so will use
more effort than nls when both work.

JN

On 15-08-18 12:08 PM, Xochitl CORMON wrote:
> Dear all,
>
> I am trying to estimate VBGF parameters K and Linf using non linear
> regression and nls(). First I used a classic approach where I estimate
> both parameters together as below with "alkdyr" being a subset
per year
> of my age-length-key database and running in a loop.
>
> vbgf.par <- nls(Lgtcm ~  Linf *(1 - exp(-K * (Age - tzero))), start >
c(K= 0.07, Linf = 177.1), data=alkdyr)
>
> I obtain an estimation of both parameters that are strongly correlated.
> Indeed after plotting Linf ~ K and fitting a linear regression I obtain
> a function (Linf = a + b*K) with R2= 0.8 and a = 215, b = -763.
>
> In this context, to take into account explicitly correlation between
> parameters, I decided to fit a new non linear regression derivate from
> VBGF but where Linf is expressed depending on K (I am most interested in
> K). To do so, I tried this model:
> vbgf.par <- nls(Lgtcm ~  (a + (b*k)) *(1 - exp(-k * (Age - tzero))),
> start = c(k= 0.07, a= 215, b=-763), data=alkdyr)
>
> Unfortunately at this point I cannot go further as I get the error
> message "singular gradient matrix at initial parameter
estimates".
>
> I tried to use alg= plinear (which I am not sure I understand properly
> yet). If I give a starting value for a and b only, I have an error
> message stating "step factor below minFactor" (even when
minFactor is
> set to 100000000000).
>
> Any help will be more than welcome as this is quite urgent....
>
> Best,
>
> Xochitl C.
>
>
>
>