extract.covmat {simex} | R Documentation |
Extracts the covariance matrix from various models
and returns them in a way, so that the simex
and mcsimex
functions can use them.
extract.covmat(model)
model |
object of a fitting function |
So far objects of class lm
, glm
, gam
, nls
, lme
, nlme
are supported.
covmat |
covariance matrix of the supplied model |
Easily extendable for other objects. Is required for jackknife variance estimation.
This function is for internal use only!
Wolfgang Lederer
x <- rnorm(100,0,100) u <- rnorm(100,0,25) w <- x+u y <- x +rnorm(100,0,9) model <- lm(y~w, x = TRUE, y =TRUE) extract.covmat(model) summary(model)$cov.unscaled*summary(model)$sigma^2