Reputation: 81
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!
Upvotes: 1
Views: 1088
Reputation: 263421
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)
Upvotes: 3