[R] nls.control()

Ranney, Steven
Tue, 02 Sep 2008 21:56:05 -0000

All -

I have data:

TL	age
388	4
418	4
438	4
428	5
539	10
432	4
444	7
421	4
438	4
419	4
463	6
423	4
...
[truncated]

and I'm trying to fit a simple Von Bertalanffy growth curve with program:

#Creates a Von Bertalanffy growth model
VonB=nls(TL~Linf*(1-exp(-k*(age-t0))), data=box5.4,
    start=list(Linf=1000, k=0.1, t0=0.1), trace=TRUE)
#Scatterplot of the data
plot(TL~age, data=box5.4, pch=19, xlab="Age (yr)", ylab="Total
length (mm)")
#Incorporates the model VonB onto the called scatterplot
mod1a=seq(2, 11, by=0.001)
lines(mod1a, predict(VonB, list(age = mod1a)), col="blue", lwd=2)

#summarizes the model VonB with the model formula, parameter estimates, std.
errors,
#and a correlation matrix
summary(VonB, corr=T)
#Provides 95% confidence intervals for the parameter estimates
confint(VonB)

Everything works as it should right up until the confint(VonB) statement.  When
I ask
for the confidence intervals, R goes through the process then stops and gives

"Error in prof$getProfile() :
  step factor 0.000488281 reduced below 'minFactor' of
0.000976562".

However, when I use nls.control=(minFactor=0.000001) OR
nls.control(minFactor=0.000001),
I get the same error.  I'm at a loss.  I'm not sure what else I can do
to have R reduce
the step size if it's not nls.control().

Thanks,

SR

Steven H. Ranney

Graduate Research Assistant (Ph.D)
USGS Montana Cooperative Fishery Research Unit
Montana State University
P.O. Box 173460
Bozeman, MT 59717-3460

phone: (406) 994-6643
fax: (406) 994-7479


	[[alternative HTML version deleted]]