Calculate the variance-covariance matrix for an object of class "chandwich"
Source:R/methods.R
vcov.chandwich.Rdvcov 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 = TRUEthen the full variance-covariance matrix is returned, including any fixed usingfixed_parsandfixed_atin the call toadjust_loglik. In this instance the corresponding elements of the matrix areNA. Otherwise, the variance-covariance matrix of only the free parameters is returned.The default is
complete = FALSE, which is in sync withcoef.chandwich.- adjusted
A logical scalar. If
adjusted = TRUEthen 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.
Value
A numeric matrix. The dimensions will be named if names were
provided in the call to adjust_loglik.
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.
See also
coef.chandwich: coef method for
class "chandwich".
summary.chandwich: summary method for
class "chandwich".
adjust_loglik to adjust a user-supplied
loglikelihood.