Title
xtscc - Regression with Driscoll-Kraay standard errors
Syntax
xtscc depvar [indepvars] [if] [in] [weight] [, options]
options Description ------------------------------------------------------------------------- Model lag(#) set maximum lag order of autocorrelation; default is m(T)=floor[4(T/100)^(2/9)] fe perform fixed effects (within) regression pooled perform pooled OLS/WLS regression; default noconstant suppress regression constant in pooled OLS/WLS regressions ase return (asymptotic) Driscoll-Kraay SE without small sample adjustment
Reporting level(#) set confidence level; default is level(95) ------------------------------------------------------------------------- You must tsset your data before using xtscc. by, statsby, and xi may be used with xtscc; see prefix. aweights are allowed unless option fe is specified; see weight. See xtscc postestimation for features available after estimation.
Description
xtscc produces Driscoll and Kraay (1998) standard errors for coefficients estimated by pooled OLS/WLS or fixed-effects (within) regression. depvar is the dependent variable and varlist is an (optional) list of explanatory variables.
The error structure is assumed to be heteroskedastic, autocorrelated up to some lag, and possibly correlated between the groups (panels). Driscoll-Kraay standard errors are robust to very general forms of cross-sectional ("spatial") and temporal dependence when the time dimension becomes large. This nonparametric technique of estimating standard errors does not place any restrictions on the limiting behavior of the number of panels. Consequently, the size of the cross-sectional dimension in finite samples does not constitute a constraint on feasibility - even if the number of panels is much larger than T. However, note that the estimator is based on large T asymptotics. Therefore, one should be somewhat cautious with applying this estimator to panel datasets with a large number of groups but a small number of observations over time.
This implementation of Driscoll and Kraay's covariance estimator works for both, balanced and unbalanced panels, respectively. Furthermore, it is capable to handle missing values.
Options
+-------+ ----+ Model +------------------------------------------------------------
lag(#) specifies the maximum lag to be considered in the autocorrelation structure. If you do not specify this option, a lag length of m(T)=floor[4(T/100)^(2/9)] is chosen.
fe performs fixed-effects (within) regression with Driscoll-Kraay standard errors. These standard errors are robust to very general forms of cross-sectional ("spatial") and temporal dependence (provided that T is sufficiently large). See above. If the residuals are assumed to be heteroscedastic only: use xtreg, fe robust.
pooled performs pooled OLS/WLS regression with Driscoll-Kraay standard errors. These standard errors are robust to very general forms of cross-sectional ("spatial") and temporal dependence (provided that T is sufficiently large). See above. If the residuals are assumed to be heteroscedastic only: use reg, robust cluster(). If the residuals are assumed to be heteroscedastic and autocorrelated only (i.e. there is no cross-sectional correlation): use newey, lag() force.
noconstant; see [R] estimation options.
ase returns asymptotic Driscoll-Kraay standard errors. Standard errors that are computed this way might be slightly overoptimistic as they abstract away from a small sample adjustment.
+-----------+ ----+ Reporting +--------------------------------------------------------
level(#); see estimation options.
Examples
. sysuse grunfeld
Pooled OLS estimation:
. reg invest mvalue kstock, robust cluster(company) . est store robust
. newey invest mvalue kstock, lag(4) force . est store newey
. xtscc invest mvalue kstock, lag(4) . est store dris_kraay
. est table *, b se t
Fixed-effects (within) regression:
. est clear . xtreg invest mvalue kstock, fe robust . est store fe_robust
. xtscc invest mvalue kstock, fe lag(4) . est store fe_dris_kraay
. est table *, b se t
Reference
- Driscoll, John C. and Aart C. Kraay, 1998, Consistent Covariance Matrix Estimation with Spatially Dependent Panel Data, Review of Economics and Statistics 80, 549-560.
Notes
- The main procedure of xtscc is implemented in Mata and largely follows Driscoll and Kraay's GAUSS program which is available from http://www.johncdriscoll.net/. - The xtscc uses functions from Ben Jann's moremata package.
Acknowledgements
I would like to thank David M. Drukker and Bill Gould from StataCorp for their useful comments and suggestions.
Author
Daniel Hoechle, University of Basel, daniel.hoechle@unibas.ch
Also see
Manual: [R] regress, [TS] newey, [XT] xtreg
Online: xtscc postestimation; tsset, regress, newey, xtreg, _robust