vcov.feis: Calculate Variance-Covariance Matrix for feis models

View source: R/methods.R

vcov.feisR Documentation

Calculate Variance-Covariance Matrix for feis models

Description

Returns the variance-covariance matrix of the main parameters of an object of class "feis". By default, this is the unscaled variance-covariance matrix.

Usage

## S3 method for class 'feis'
vcov(object, ..., scale = FALSE)

Arguments

object

an object of class "feis", fitted model.

...

further arguments.

scale

logical. If TRUE returns scaled vcov by sigma^2 (default is FALSE).

Details

By default, vcov() return the unscaled variance-covariance matrix of the fitted FEIS model. If set to scale = TRUE, the vcov is scaled by the nuisance parameter sigma^2 (as is object$vcov). Note that corrections for clustering (i.e. robust = TRUE in the fitted model) are ignored in vcov(). In this case, object$vcov will return the vcov with corrections for clustering.

Value

A matrix of the estimated covariances between the parameter estimates in the fitted FEIS model.

See Also

feis, vcov, sigma

Examples

data("mwp", package = "feisr")
feis.mod <- feis(lnw ~ marry + enrol | exp,
                 data = mwp, id = "id")
vcov(feis.mod)
all.equal(vcov(feis.mod), feis.mod$vcov) # FALSE: not equal, because vcov() unscaled
all.equal(vcov(feis.mod, scale = TRUE), feis.mod$vcov) # equal


feisr documentation built on April 1, 2022, 5:06 p.m.