[R] NLS "Singular Gradient" Error

bsnrh bsnrh at leeds.ac.uk
Wed Apr 28 13:43:57 CEST 2010


Hello,

I am trying to model a type II functional response of number of prey eaten
(Ne) against number supplied (No) with a non-linear least squares regression
(nls). I am using a modification of Holling's (1959) disc equation to
account for non-replacement of prey;

Ne=No{1-exp[a(bNe-T)]}

where a is the attack rate, b is the handling time, and T is the
experimental period.

My script is as follows;

model<-nls(Ne~No*(1-exp(a*(b*Ne-T))),start=list(a=1.2,b=0.015,T=24))

This returns the following error;

"Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at
initial parameter estimates".

Can anyone please advise as to what I may be doing wrong? I have tried
modifying the parameter start points with no success.

Many thanks,
-- 
View this message in context: http://r.789695.n4.nabble.com/NLS-Singular-Gradient-Error-tp2069029p2069029.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list