vcov.chandwich: Calculate the variance-covariance matrix for an object of...

View source: R/methods.R

vcov.chandwichR Documentation

Calculate the variance-covariance matrix for an object of class "chandwich"

Description

vcov method for class "chandwich".

Usage

## S3 method for class 'chandwich'
vcov(object, complete = FALSE, adjusted = TRUE, ...)

Arguments

object

an object of class "chandwich", a result of a call to adjust_loglik.

complete

A logical scalar. If complete = TRUE then the full variance-covariance matrix is returned, including any fixed using fixed_pars and fixed_at in the call to adjust_loglik. In this instance the corresponding elements of the matrix are NA. Otherwise, the variance-covariance matrix of only the free parameters is returned.

The default is complete = FALSE, which is in sync with coef.chandwich.

adjusted

A logical scalar. If adjusted = TRUE then the variance-covariance matrix is estimated using a sandwich estimator. Otherwise, the inverse of the observed information at the MLE is used.

...

Additional optional arguments. At present no optional arguments are used.

Details

The variance-covariance matrix is based on attributes(object)$adjVC for adjusted = TRUE and attributes(object)$VC for adjusted = FALSE. These return the estimate variance-covariance matrix of only the free parameters.

Value

A numeric matrix. The dimensions will be named if names were provided in the call to adjust_loglik.

See Also

coef.chandwich: coef method for class "chandwich".

summary.chandwich: summary method for class "chandwich".

adjust_loglik to adjust a user-supplied loglikelihood.


chandwich documentation built on Aug. 26, 2023, 1:07 a.m.