同意47楼观点。xtgls 主要适合大T小N,不适合大N小T。xtscc 不能用作randon effect.
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 very general forms of cross-sectional
("spatial") and temporal dependence when the time dimension becomes large. However, because this
nonparametric technique of estimating standard errors does not place any 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 panel datasets with a large number of groups that have only a short number of observations.