XTMG: Stata module to estimate panel time series models with heterogeneous slopes

The xtmg command implements three estimators from the recent panel time series literature which allow for heterogeneous slopes across panel units: the Pesaran and Smith (1995) Mean Group estimator, the Pesaran (2006) Common Correlated Effects Mean Group estimator and the Augmented Mean Group estimator introduced in Eberhardt and Teal (2010) and Bond and Eberhardt (2009). The latter two allow for cross-section dependence in the panel and have been shown to perform well in (co-)integrated panels. The routine allows for a number of options, including the computation of outlier-robust means (implemented using the rreg command), presentation of the group-specific regression results and the calculation of residual series based on the group-specific estimates.