1

I'm using nls.lm() function to get a MODEL. Later, I write "summary(MODEL)" and I get the list of parameters, std.error... and others convergence and model details.

The question is,

someone knows how R computes these std.error (for each parameter) shown with summary()???

Thanks!

Sergio
  • 81
  • 9
  • @Roland: I think you have been misled by the looseness of R's naming conventions which does not enforce the connection between the dot-formalism in function dispatch. There is no `nls.lm` function in any of the default packages, and the `nls` function would not accept an object of class `lm`. The "LM" stands for Levenberg-Marquardt algorithm rather than "linear model". – IRTFM Apr 28 '16 at 13:34
  • @42- No, I just confused it with `nlsLM`, which is the function from this packages I usually use. – Roland Apr 28 '16 at 13:42

1 Answers1

3

If you type the function name, summary.nls.lm preceded by the package name, minpack.lm and joined by the ::: function, you see the code.

minpack.lm:::summary.nls.lm

This is the section that calculates the standard errors

ibb <- chol(object$hessian)
ih <- chol2inv(ibb)
p <- length(param)
rdf <- length(object$fvec) - p
resvar <- deviance(object)/rdf
se <- sqrt(diag(ih) * resvar)
IRTFM
  • 258,963
  • 21
  • 364
  • 487
  • Thanks!! I think I will help me, because this function (nls.lm) is in minpack.lm package, you can see it in R-documentation (https://cran.r-project.org/web/packages/minpack.lm/index.html). Really, I think that nlsLM call nls.lm to work. Regards!! – Sergio Apr 28 '16 at 22:10