Learn R Programming

galamm (version 0.2.3)

vcov.galamm: Calculate variance-covariance matrix for GALAMM fit

Description

Calculate variance-covariance matrix for GALAMM fit

Usage

# S3 method for galamm
vcov(object, parm = "beta", ...)

Value

A variance-covariance matrix.

Arguments

object

Object of class galamm returned from galamm.

parm

The parameters for which the variance-covariance matrix should be calculated. Character vector with one or more of the elements "theta", "beta", "lambda", and "weights". Can also be an integer vector. When given as a character, it must be in only lowercase letters.

...

Further arguments passed on to other methods. Currently not used.

See Also

confint.galamm() for the method computing confidence intervals. See vcov() for the generic function.

Other details of model fit: VarCorr(), coef.galamm(), confint.galamm(), deviance.galamm(), factor_loadings.galamm(), family.galamm(), fitted.galamm(), fixef(), formula.galamm(), llikAIC(), logLik.galamm(), nobs.galamm(), predict.galamm(), print.VarCorr.galamm(), ranef.galamm(), residuals.galamm(), response(), sigma.galamm()

Examples

Run this code
# Linear mixed model with heteroscedastic residuals
mod <- galamm(
  formula = y ~ x + (1 | id),
  weights = ~ (1 | item),
  data = hsced
)

# Extract covariance matrix for fixed regression coefficients
vcov(mod, parm = "beta")

# and then for weights, which gives us the variance.
vcov(mod, parm = "weights")

Run the code above in your browser using DataLab