[R] Error 'singular gradient' in nonlinear model fitting
HongSheng Liao
HLiao at odu.edu
Fri Feb 15 18:41:48 CET 2008
w.age.female.2004 <- nls(WEIGHT ~ (alpha*TOTAL^beta)/454,
start=list(alpha=1, beta=3),
data=spottedseatrout2004.female.data)
I am trying to fit above model to length-weight data of a fish species
(spotted seatrout) by year (1999-2006). The convergence occurred for all
the years except 2002 and 2004. In these two year, R shows the error
called 'singular gradient' in the model. Could anyone please help me to
fix the error? I don't think there are any problems with my data because I
can fit the same model to 2004 data without any problems using SAS. Thank
you very much in advance.
Hongsheng (Hank) Liao, Ph.D.
Lab Manager
Center for Quantitative Fisheries Ecology
800 West 46th Street
Old Dominion University
Norfolk, Virginia 23508
Phone:757.683.4571
Fax:757.683.5293
More information about the R-help
mailing list