Dear all, Is there a way to retrieve standard errors from nls models? The help page tells me that arguments such as se.fit are ignored... Many thanks and best wishes Christoph -- Dr. rer.nat. Christoph Scherber University of Goettingen DNPW, Agroecology Waldweg 26 D-37073 Goettingen Germany phone +49 (0)551 39 8807 fax +49 (0)551 39 8806 Homepage http://www.gwdg.de/~cscherb1
Christoph Scherber <Christoph.Scherber <at> agr.uni-goettingen.de> writes:> > Dear all, > > Is there a way to retrieve standard errors from nls models? > The help page tells me that arguments > such as se.fit are ignored... > > Many thanks and best wishes > ChristophI have written some reasonably generic delta-function code that can in principle do this. I have been thinking about contributing it, if R-core thinks it's worthwhile, but I haven't gotten around to incorporating it into a version of predict.nls yet. In the meantime, if you install the emdbook package and look at ?deltavar, you may be able to get that to work for you ... (if not, get back in touch & I'll try to help -- maybe this will be the impetus to develop that code a bit more). cheers Ben Bolker
Dear Christoph, using the package 'alr3' it's not difficult! Have a look at the following example: ## Fitting a Michaelis-Menten model Puromycin.m1<-nls(rate~a*conc/(b+conc), data=Puromycin[1:12,], start=list(a=200, b=1)) library(alr3) ## Predictions (with standard errors) at concentrations 0.02, 0.06, and 011 delta.method(Puromycin.m1, "a*0.02/(b+0.02)") delta.method(Puromycin.m1, "a*0.06/(b+0.06)") delta.method(Puromycin.m1, "a*0.11/(b+0.11)") Hope you can make it work for your own application! Christian