Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

vcov.feglm

Extract estimates of the covariance matrix


Description

vcov.feglm computes an estimate of the covariance matrix of the estimator of the structural parameters from objects returned by feglm. The estimate is obtained using the Hessian, the scores, or a combination of boths after convergence.

Usage

## S3 method for class 'feglm'
vcov(
  object,
  type = c("hessian", "outer.product", "sandwich", "clustered"),
  cluster = NULL,
  cluster.vars = NULL,
  ...
)

Arguments

object

an object of class "feglm".

type

the type of covariance estimate required. "hessian" refers to the inverse of the negative expected Hessian after convergence and is the default option. "outer.product" is the outer-product-of-the-gradient estimator, "sandwich" is the sandwich estimator (sometimes also refered as robust estimator), and "clustered" computes a clustered covariance matrix given some cluster variables.

cluster

a symbolic description indicating the clustering of observations.

cluster.vars

deprecated; use cluster instead.

...

other arguments.

Details

Multi-way clustering is done using the algorithm of Cameron, Gelbach, and Miller (2011). An example is provided in the vignette "Replicating an Empirical Example of International Trade".

Value

The function vcov.feglm returns a named matrix of covariance estimates.

References

Cameron, C., J. Gelbach, and D. Miller (2011). "Robust Inference With Multiway Clustering". Journal of Business & Economic Statistics 29(2).

See Also


alpaca

Fit GLM's with High-Dimensional k-Way Fixed Effects

v0.3.3
GPL-3
Authors
Amrei Stammann [aut, cre], Daniel Czarnowske [aut] (<https://orcid.org/0000-0002-0030-929X>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.