Various Versatile Variances: An Object-Oriented Implementation of Clustered Covariances in R

被引:407
作者
Zeileis, Achim [1 ]
Koll, Susanne [1 ]
Graham, Nathaniel [2 ]
机构
[1] Univ Innsbruck, Fac Econ & Stat, Dept Stat, Univ Str 15, A-6020 Innsbruck, Austria
[2] Texas A&M Int Univ, Div Int Banking & Finance Studies, AR Sanchez Jr Sch Business, 5201 Univ Blvd, Laredo, TX 78041 USA
关键词
clustered data; covariance matrix estimator; object orientation; simulation; R; ROBUST STANDARD ERRORS; BETA REGRESSION; TIME-SERIES; COUNT DATA; BOOTSTRAP; HETEROSKEDASTICITY; INFERENCE; MODELS; INNOVATION; ESTIMATOR;
D O I
10.18637/jss.v095.i01
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
Clustered covariances or clustered standard errors are very widely used to account for correlated or clustered data, especially in economics, political sciences, and other social sciences. They are employed to adjust the inference following estimation of a standard least-squares regression or generalized linear model estimated by maximum likelihood. Although many publications just refer to "the" clustered standard errors, there is a surprisingly wide variety of clustered covariances, particularly due to different flavors of bias corrections. Furthermore, while the linear regression model is certainly the most important application case, the same strategies can be employed in more general models (e.g., for zero-inflated, censored, or limited responses). In R, functions for covariances in clustered or panel models have been somewhat scattered or available only for certain modeling functions, notably the (generalized) linear regression model. In contrast, an object-oriented approach to "robust" covariance matrix estimation - applicable beyond lm() and glm() - is available in the sandwich package but has been limited to the case of cross-section or time series data. Starting with sandwich 2.4.0, this shortcoming has been corrected: Based on methods for two generic functions (estfun() and bread()), clustered and panel covariances are provided in vcovCL(), vcovPL(), and vcovPC(). Moreover, clustered bootstrap covariances are provided in vcovBS(), using model update() on bootstrap samples. These are directly applicable to models from packages including MASS, pscl, countreg, and betareg, among many others. Some empirical illustrations are provided as well as an assessment of the methods' performance in a simulation study.
引用
收藏
页码:1 / 36
页数:36
相关论文
共 75 条
[1]   When Should You Adjust Standard Errors for Clustering?* [J].
Abadie, Alberto ;
Athey, Susan ;
Imbens, Guido W. ;
Wooldridge, Jeffrey M. .
QUARTERLY JOURNAL OF ECONOMICS, 2022, 138 (01) :1-35
[2]   Innovation and Institutional Ownership [J].
Aghion, Philippe ;
Van Reenen, John ;
Zingales, Luigi .
AMERICAN ECONOMIC REVIEW, 2013, 103 (01) :277-304
[3]   HETEROSKEDASTICITY AND AUTOCORRELATION CONSISTENT COVARIANCE-MATRIX ESTIMATION [J].
ANDREWS, DWK .
ECONOMETRICA, 1991, 59 (03) :817-858
[4]  
[Anonymous], 1997, Bootstrap methods and their applications
[5]  
[Anonymous], 2013, International Journal of Statistics and Probability, DOI [10.5539/ijsp.v2n4p1, DOI 10.5539/IJSP.V2N4P1]
[6]  
[Anonymous], 2004, J STAT SOFTW, DOI 10.18637/jss.v011.i10Number:1
[7]  
[Anonymous], 2007, UK STAT US GROUP M 2
[8]   Modeling Certainty with Clustered Data: A Comparison of Methods [J].
Arceneaux, Kevin ;
Nickerson, David W. .
POLITICAL ANALYSIS, 2009, 17 (02) :177-190
[9]  
ARELLANO M, 1987, OXFORD B ECON STAT, V49, P431
[10]  
Bailey D, 2011, J STAT SOFTW, V42, P1