Variance-Covariance with Cluster Correction for Heckman Models
Source:R/vcovCL.heckmanGE.R
vcovCL.heckmanGE.Rd
The vcovCL.heckmanGE
function computes the variance-covariance matrix of a Heckman model,
applying a cluster correction. This is useful for obtaining robust variance estimates, especially
when there is within-group dependence.
Arguments
- x
An object resulting from the estimation of a Heckman model using the
heckmanGE
method.- cluster
A vector or factor identifying clusters in the data. If NULL, assumes no clustering.
- type
A character string specifying the type of cluster correction to be applied. It can be
"HC0"
,"HC1"
,"HC2"
, or"HC3"
.- sandwich
A logical value. If TRUE, the function applies the sandwich estimator to the variance-covariance matrix.
- fix
A logical value. If TRUE, corrects any negative eigenvalues in the variance-covariance matrix.
- ...
Additional arguments that can be passed to internal methods.