View source: R/generics_vcov.R
| vcov.felm | R Documentation |
Covariance matrix for the estimator of the structural parameters from objects returned by felm. The covariance is computed during model fitting - either the inverse Hessian (default) or the sandwich estimator if cluster variables are specified in the formula.
## S3 method for class 'felm'
vcov(object, ...)
object |
an object of class |
... |
additional arguments (currently ignored). |
A named matrix of covariance estimates.
Cameron, C., J. Gelbach, and D. Miller (2011). "Robust Inference With Multiway Clustering". Journal of Business & Economic Statistics 29(2).
felm
# Model with clustering - returns sandwich covariance
ross2004_s1 <- ross2004[ross2004$year == 1994, ]
ross2004_s1 <- ross2004_s1[ross2004_s1$ltrade >
quantile(ross2004_s1$ltrade, 0.75), ]
ross2004_s2 <- ross2004[ross2004$year == 1999, ]
ross2004_s2 <- ross2004_s2[ross2004_s2$ltrade >
quantile(ross2004_s2$ltrade, 0.75), ]
ross2004_subset <- rbind(ross2004_s1, ross2004_s2)
fit <- felm(ltrade ~ ldist | ctry1 | year, ross2004_subset)
vcov(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.