[R] nls.control()

From: Ranney, Steven <steven.ranney_at_montana.edu>
Date: Tue, 02 Sep 2008 15:56:05 -0600


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]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 02 Sep 2008 - 21:59:52 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 03 Sep 2008 - 06:34:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive