Title
xtscc -- Regression with Driscoll-Kraay standard errors
Syntax
xtscc depvar [indepvars] [if] [in] [weight] [, options]
options description
-------------------------------------------------------------------------------------------------
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
level(#) set confidence level; default is level(95)
-------------------------------------------------------------------------------------------------
You must tsset your data before using xtscc; see [TS] tsset.
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). These standard errors are robust to general forms of
cross-sectional (spatial) and temporal dependence when the time dimension becomes large. Because
this nonparametric technique of estimating standard errors places no restrictions on the limiting
behavior of the number of panels, 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. Nevertheless, because the estimator is based on an asymptotic theory, one should be
somewhat cautious with applying this estimator to panels that contain a large cross-section but
only a short time dimension.
The xtscc command is suitable for use with both balanced and unbalanced panels. Furthermore, it
can handle missing values.
Options
lag(#) specifies the maximum lag to be considered in the autocorrelation structure. By default,
a lag length of m(T)=floor[4(T/100)^(2/9)] is assumed.
fe performs fixed-effects (within) regression with Driscoll and Kraay standard errors. These
standard errors are robust to general forms of cross-sectional ("spatial") and temporal
dependence (provided that T is sufficiently large). See above. If the residuals are assumed
to be heteroskedastic only, use xtreg, fe robust.
pooled performs pooled OLS/WLS regression with Driscoll-Kraay standard errors. These standard
errors are heteroskedasticity consistent and robust to general forms of cross-sectional
(spatial) and temporal dependence when the time dimension becomes large. If the residuals
are assumed to be heteroskedastic only, use xtreg, fe robust. When the standard errors
should be heteroskedasticity- and autocorrelation consistent, use either regress, cluster()
or newey, lag(#) force. Analytic weights are allowed for use with option pooled; see weight.
level(#); see estimation options.
Examples
. webuse 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, J. C., and A. 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.
Acknowledgments
I thank David M. Drukker and William 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;
[TS] tsset, [R] regress, [TS] newey, [XT] xtreg, [P] _robust
(remote file ends)