help multipurt -------------------------------------------------------------------------------
Title
multipurt -- Running 1st and 2nd generation panel unit root tests for multiple variables and lags
Syntax
multipurt varname [if] [in] [, lags(numlist)]
Description
multipurt runs the Maddala and Wu (1999) as well as the Pesaran (2007) panel unit root tests for multiple variables and lags. This is not a new command for these panel unit root tests but a convenient tool using the existing xtfisher (if installed) and pescadf (if installed) commands written by Scott Merryman and Piotr Lewandowski respectively. The maximum number of variable or residual series to be tested is set to 9.
The multipurt routine implements these two panel unit root tests building on Dickey-Fuller and Augmented Dickey-Fuller regressions for models with and without a trend term.
Details
The Maddala and Wu (1999) test assumes/allows for heterogeneity in the autoregressive coefficient of the Dickey-Fuller regression and ignores cross-section dependence in the data. Building on the Fisher-principle it constructs a chi-squared statistic, whereby the p-values of country-specific (A)DF tests are transformed into logs and summed across panel members. Multiplied by -2 this sum is then distributed chi-squared with 2N degrees of freedom under the null of nonstationarity in all panel members/series.
The Pesaran (2007) CIPS test allows for assumes/allows for heterogeneity in the autoregressive coefficient of the Dickey-Fuller regression and allows for the presence of a single unobserved common factor with heterogeneous factor loadings in the data. The statistic is constructed from the results of panel-member-specific (A)DF regressions where cross-section averages of the dependent and independent variables (including the lagged differences to account for serial correlation) are included in the model (referred to as CADF regressions). The averaging of the group-specific results follows the procedure in the Im, Pesaran and Shin (2003) test. Under the null of nonstationarity the test statistic has a non-standard distribution.
The pescadf command used in this procedure will report an error message if there are gaps in the data. However, unless the number of observations missing in this fashion is large the Z-tbar test statistic can still be computed.
Required options
lags(numlist) identifies the maximum number of lagged differences to be included in the group-specific Augmented Dickey Fuller regressions. The routine begins by omitting these augmentations (Dickey-Fuller regression: lags(0)), which are intended to capture the serial correlation in the data.
Return values
Scalars r(N_g) Number of panel groups r(maxlags) Maximum number of lags to be included in the ADF regressi > ons r(N) Number of observations (evaluated before testing, i.e. do > es not represent the number of observations in the DF and ADF > regressions, which depends on lag-length selection) r(avgobs) Average number of time series observations across panel m > embers (same comment as above applies)
Matrices r(mw) Matrix containing the results for the Maddala and Wu (199 > 9) test without trend. The column order is as follows: # of la > gs, chi-sq statistic for variable 1, implied p-value for v > ariable 1, chi-sq statistic for variable 2, etc. r(mw_trend) Matrix containing the results for the Maddala and Wu (199 > 9) test with trend. Same column order as above. r(cips) Matrix containing the results for the Pesaran(2007) test without trend. The column order is as follows: # of la > gs, Z-tbar statistic for variable 1, implied p-value for variable 1, t-bar statistic for variable 1, Z-tbar sta > tistic for variable 2, etc. r(cips_trend) Matrix containing the results for the Pesaran(2007) test with trend. Same column order as above.
Macros r(varname) Names of variables or residual series tested
Example
Download FAO production data (zipped file) for the agriculture sector in 128 countries (1961-2002, unbalanced). See Eberhardt and Teal (2010) for details on data construction and deflation. Cross-country growth empirics are reviewed in Eberhardt and Teal (2011).
Variables used in illustration: ly log value-added per worker, ltr log tractors per worker, llive log livestock per worker, lf log fertilizer per worker, ln log land per worker (all with reference to the agricultural sector). Note that the dataset is quite large, such that it may be advisable (but not required) to increase the memory and matsize before loading the data (e.g. .set mem 100m, .set matsize 8000). The routine also works with a much more modest memory and matsize allocation.
Once the dataset is loaded into the program, set the panel dimensions: time variable - year, country identifier - clist2. .tsset clist2 year
Investigate stationarity in the production function variables. We limit the analysis to the first 20 countries (results for the full N=128 sample -if !missing(clist2) & sample==1- can take several minutes to compute) .multipurt ly ltr llive lf ln if clist2<21 & sample==1, lags(4)
References
Eberhardt, Markus and Francis Teal (2011) 'Econometrics for Grumblers: A New Look at the Literature on Cross-Country Growth Empirics', Journal of Economic Surveys, Vol.25(1), pp.109–155.
Eberhardt, Markus and Francis Teal (2010) 'Mangos in the Tundra? Spatial Heterogeneity in Agricultural Productivity Analysis', Centre for the Study of African Economies, University of Oxford, unpublished working paper, available here.
Im, K, Hashem Pesaran and Yeongchol Shin (2003) 'Testing for unit roots in heterogeneous panels', Journal of Econometrics, Vol.115(1), pp.53-74.
Maddala, G.S. and S. Wu (1999) 'A comparative study of unit root tests with panel data and a new simple test', Oxford Bulletin of Economics and Statistics, Vol.61(Special Issue), pp.631-652.
Acknowledgements and Disclaimer
This routine uses some clever practices for data handling taken from Damiaan Persyn's xtwest (if installed) command. It furthermore employs the panel unit root tests implemented in Stata by Scott Merryman xtfisher (if installed) and Piotr Lewandowski pescadf (if installed) and also uses some of these authors' data handling routines. Users should refer to these help files for more details and acknowledge the authors of the commands. Thanks to Kit Baum for help and support. Any errors are of course my own.
Author
Markus Eberhardt Centre for the Study of African Economies Department of Economics University of Oxford Manor Road, Oxford OX1 3UQ markus.eberhardt@economics.ox.ac.uk
Also see
Online: help for xtfisher (if installed), pescadf (if installed), ipshin (if installed)