feisr (version 1.3.0)

vcov.feis: 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 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).

Value

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

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.

See Also

feis, vcov, sigma

Examples

Run this code
# NOT RUN {
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

# }

Run the code above in your browser using DataLab