Stata 15 help for xtunitroot

[XT] xtunitroot -- Panel-data unit-root tests

Syntax

Levin-Lin-Chu test

xtunitroot llc varname [if] [in] [, LLC_options]

Harris-Tzavalis test

xtunitroot ht varname [if] [in] [, HT_options]

Breitung test

xtunitroot breitung varname [if] [in] [, Breitung_options]

Im-Pesaran-Shin test

xtunitroot ips varname [if] [in] [, IPS_options]

Fisher-type tests (combining p-values)

xtunitroot fisher varname [if] [in], {dfuller | pperron} lags(#) [Fisher_options]

Hadri Lagrange multiplier stationarity test

xtunitroot hadri varname [if] [in] [, Hadri_options]

LLC_options Description ------------------------------------------------------------------------- trend include a time trend noconstant suppress panel-specific means demean subtract cross-sectional means lags(lag_spec) specify lag structure for augmented Dickey-Fuller (ADF) regressions kernel(kernel_spec) specify method to estimate long-run variance ------------------------------------------------------------------------- lag_spec is either a nonnegative integer or one of aic, bic, or hqic followed by a positive integer. kernel_spec takes the form kernel maxlags, where kernel is one of bartlett, parzen, or quadraticspectral and maxlags is either a positive number or one of nwest or llc.

HT_options Description ------------------------------------------------------------------------- trend include a time trend noconstant suppress panel-specific means demean subtract cross-sectional means altt make small-sample adjustment to T -------------------------------------------------------------------------

Breitung_options Description ------------------------------------------------------------------------- trend include a time trend noconstant suppress panel-specific means demean subtract cross-sectional means robust allow for cross-sectional dependence lags(#) specify lag structure for prewhitening -------------------------------------------------------------------------

IPS_options Description ------------------------------------------------------------------------- trend include a time trend demean subtract cross-sectional means lags(lag_spec) specify lag structure for ADF regressions ------------------------------------------------------------------------- lag_spec is either a nonnegative integer or one of aic, bic, or hqic followed by a positive integer.

Fisher_options Description ------------------------------------------------------------------------- * dfuller use ADF unit-root tests * pperron use Phillips-Perron unit-root tests * lags(#) specify lag structure for prewhitening demean subtract cross-sectional means dfuller_opts any options allowed by the dfuller command pperron_opts any options allowed by the pperron command ------------------------------------------------------------------------- * Either dfuller or pperron is required. * lags(#) is required.

Hadri_options Description ------------------------------------------------------------------------- trend include a time trend demean subtract cross-sectional means robust allow for cross-sectional dependence kernel(kernel_spec) specify method to estimate long-run variance ------------------------------------------------------------------------- kernel_spec takes the form kernel [#], where kernel is one of bartlett, parzen, or quadraticspectral and # is a positive number.

varname may contain time-series operators; see tsvarlist.

Menu

Statistics > Longitudinal/panel data > Unit-root tests

Description

xtunitroot performs a variety of tests for unit roots (or stationarity) in panel datasets. The Levin-Lin-Chu (2002), Harris-Tzavalis (1999), Breitung (2000; Breitung and Das 2005), Im-Pesaran-Shin (2003), and Fisher-type (Choi 2001) tests have as the null hypothesis that all the panels contain a unit root. The Hadri (2000) Lagrange multiplier (LM) test has as the null hypothesis that all the panels are (trend) stationary. The top of the output for each test makes explicit the null and alternative hypotheses. Options allow you to include panel-specific means (fixed effects) and time trends in the model of the data-generating process.

Options

LLC_options

trend includes a linear time trend in the model that describes the process by which the series is generated.

noconstant suppresses the panel-specific mean term in the model that describes the process by which the series is generated. Specifying noconstant imposes the assumption that the series has a mean of zero for all panels.

demean requests that xtunitroot first subtract the cross-sectional averages from the series. When specified, for each time period xtunitroot computes the mean of the series across panels and subtracts this mean from the series. Levin, Lin, and Chu suggest this procedure to mitigate the impact of cross-sectional dependence.

lags(lag_spec) specifies the lag structure to use for the ADF regressions performed in computing the test statistic.

Specifying lags(#) requests that # lags of the series be used in the ADF regressions. The default is lags(1).

Specifying lags(aic #) requests that the number of lags of the series be chosen such that the Akaike information criterion (AIC) for the regression is minimized. xtunitroot llc will fit ADF regressions with 1 to # lags and choose the regression for which the AIC is minimized. This process is done for each panel so that different panels may use ADF regressions with different numbers of lags.

Specifying lags(bic #) is just like specifying lags(aic #), except that the Bayesian information criterion (BIC) is used instead of the AIC.

Specifying lags(hqic #) is just like specifying lags(aic #), except that the Hannan-Quinn information criterion is used instead of the AIC.

kernel(kernel_spec) specifies the method used to estimate the long-run variance of each panel's series. kernel_spec takes the form kernel maxlags. kernel is one of bartlett, parzen, or quadraticspectral. maxlags is a number, nwest to request the Newey and West (1994) bandwidth selection algorithm, or llc to request the lag truncation selection algorithm in Levin, Lin, and Chu (2002).

Specifying, for example, kernel(bartlett 3) requests the Bartlett kernel with 3 lags.

Specifying kernel(bartlett nwest) requests the Bartlett kernel with the maximum number of lags determined by the Newey and West bandwidth selection algorithm.

Specifying kernel(bartlett llc) requests the Bartlett kernel with the maximum number of lags determined by the method proposed in Levin, Lin, and Chu's (2002) article:

maxlags = int(3.21*T^(1/3))

where T is the number of observations per panel. This is the default.

HT_options

trend includes a linear time trend in the model that describes the process by which the series is generated.

noconstant suppresses the panel-specific mean term in the model that describes the process by which the series is generated. Specifying noconstant imposes the assumption that the series has a mean of zero for all panels.

demean requests that xtunitroot first subtract the cross-sectional averages from the series. When specified, for each time period xtunitroot computes the mean of the series across panels and subtracts this mean from the series. Levin, Lin, and Chu suggest this procedure to mitigate the impact of cross-sectional dependence.

altt requests that xtunitroot use T-1 instead of T in the formulas for the mean and variance of the test statistic under the null hypothesis. When the number of time periods, T, is small (less than 10 or 15), the test suffers from severe size distortions when fixed effects or time trends are included; in these cases, using altt results in much improved size properties at the expense of significantly less power.

Breitung_options

trend includes a linear time trend in the model that describes the process by which the series is generated.

noconstant suppresses the panel-specific mean term in the model that describes the process by which the series is generated. Specifying noconstant imposes the assumption that the series has a mean of zero for all panels.

demean requests that xtunitroot first subtract the cross-sectional averages from the series. When specified, for each time period xtunitroot computes the mean of the series across panels and subtracts this mean from the series. Levin, Lin, and Chu suggest this procedure to mitigate the impact of cross-sectional dependence.

robust requests a variant of the test that is robust to cross-sectional dependence.

lags(#) specifies the number of lags used to remove higher-order autoregressive components of the series. The Breitung test assumes the data are generated by an AR(1) process; for higher-order processes, the first-differenced and lagged-level data are replaced by the residuals from regressions of those two series on the first # lags of the first-differenced data. The default is to not perform this prewhitening step.

IPS_options

trend includes a linear time trend in the model that describes the process by which the series is generated.

demean requests that xtunitroot first subtract the cross-sectional averages from the series. When specified, for each time period xtunitroot computes the mean of the series across panels and subtracts this mean from the series. Levin, Lin, and Chu suggest this procedure to mitigate the impact of cross-sectional dependence.

lags(lag_spec) specifies the lag structure to use for the ADF regressions performed in computing the test statistic. With this option, xtunitroot reports Im, Pesaran, and Shin's (2003) W_t-bar statistic that is predicated on T going to infinity first, followed by N going to infinity. By default, no lags are included, and xtunitroot instead reports Im, Pesaran, and Shin's t-tilde-bar and Z_t-tilde-bar statistics that assume T is fixed while N goes to infinity, as well as the t-bar statistic and exact critical values that assume both N and T are fixed.

Specifying lags(#) requests that # lags of the series be used in the ADF regressions. By default, no lags are included.

Specifying lags(aic #) requests that the number of lags of the series be chosen such that the AIC for the regression is minimized. xtunitroot llc will fit ADF regressions with 1 to # lags and choose the regression for which the AIC is minimized. This process is done for each panel so that different panels may use ADF regressions with different numbers of lags.

Specifying lags(bic #) is just like specifying lags(aic #), except that the BIC is used instead of the AIC.

Specifying lags(hqic #) is just like specifying lags(aic #), except that the Hannan-Quinn information criterion is used instead of the AIC.

If you specify lags(0), then xtunitroot reports the W_t-bar statistic instead of the Z_t-bar, Z_tilde-t-bar, and t-bar statistics.

Fisher_options

dfuller requests that xtunitroot conduct ADF unit-root tests on each panel by using the dfuller command. You must specify either the dfuller or the pperron option.

pperron requests that xtunitroot conduct Phillips-Perron unit-root tests on each panel by using the pperron command. You must specify either the pperron or the dfuller option.

lags(#) specifies the number of lags used to remove higher-order autoregressive components of the series. The Fisher test assumes the data are generated by an AR(1) process; for higher-order processes, the first-differenced and lagged-level data are replaced by the residuals from regressions of those two series on the first # lags of the first-differenced data. lags(#) is required.

demean requests that xtunitroot first subtract the cross-sectional averages from the series. When specified, for each time period xtunitroot computes the mean of the series across panels and subtracts this mean from the series. Levin, Lin, and Chu suggest this procedure to mitigate the impact of cross-sectional dependence.

dfuller_opts are any options accepted by the dfuller command, including noconstant, trend, drift, and lags(). Because xtunitroot calls dfuller quietly, the dfuller option regress has no effect.

pperron_opts are any options accepted by the pperron command, including noconstant, trend, and lags(). Because xtunitroot calls pperron quietly, the pperron option regress has no effect.

Hadri_options

trend includes a linear time trend in the model that describes the process by which the series is generated.

demean requests that xtunitroot first subtract the cross-sectional averages from the series. When specified, for each time period xtunitroot computes the mean of the series across panels and subtracts this mean from the series. Levin, Lin, and Chu suggest this procedure to mitigate the impact of cross-sectional dependence.

robust requests a variant of the test statistic that is robust to heteroskedasticity across panels.

kernel(kernel_spec) requests a variant of the test statistic that is robust to serially correlated errors. kernel_spec specifies the method used to estimate the long-run variance of each panel's series. kernel_spec takes the form kernel [#]. Three kernels are supported: bartlett, parzen, and quadraticspectral.

Specifying, for example, kernel(bartlett 3) requests the Bartlett kernel with 3 lags.

If # is not specified, then 1 lag is used.

Remarks

xtunitroot implements a variety of tests for unit roots (or stationarity) in panel datasets. Consider the autoregressive model

y_it = a_it + rho_i * y_i,t-1 + e_it

where e_it is a mean-zero regression error term and a_it represents the deterministic part of the model. i=1, ..., N indexes panels, and t=1, ..., T indexes time. a_it may include panel-specific intercepts (fixed effects), a panel-specific time trend, or nothing, in which case y_it is predicated to have mean zero for all panels.

All the tests except for the Hadri LM test investigate null hypotheses of the general form Ho: rho_i = 1 versus Ha: rho_i < 1, though they differ in precisely how Ha is specified. The Hadri LM test, rather than assuming a unit root under the null hypothesis, assumes that the data are stationary (rho_i < 1) versus the alternative that the data contain a unit root.

Here we provide a brief overview of the salient features of each test; see [XT] xtunitroot for additional information.

Remarks are presented under the following headings:

Levin-Lin-Chu test Harris-Tzavalis test Breitung test Im-Pesaran-Shin test Fisher-type tests Hadri LM stationarity test

Levin-Lin-Chu test

The Levin-Lin-Chu (LLC) (2002) test assumes that all panels have the same autoregressive parameter, that is, that rho_i = rho for all i. Then the alternative hypothesis is simply that rho < 1.

The LLC test requires that the panels be strongly balanced.

The LLC test is based on a regression t statistic, but because the data are nonstationary under the null hypothesis, the asymptotic mean and standard deviation of the t statistic depend on the specification of the deterministic part of the model.

Levin, Lin, and Chu recommend using their procedure for moderate-sized panels, with perhaps between 10 and 250 individuals and 25 to 250 observations per individual. If the time-series dimension of the panel is very large, then standard unit-root tests can be applied to each panel, because the gains from aggregation are likely to be small.

Formally, if there is no deterministic term in the model (a_it = 0), then the test allows the number of time periods, T, to tend to infinity at a slower rate than the number of cross-sectional units, N, though T must go to infinity sufficiently fast that sqrt(N)/T tends to 0. If fixed effects or time trends are included in the deterministic part of the model, then T must tend to infinity at a rate faster than N so that N/T tends to 0.

Harris-Tzavalis test

The Harris-Tzavalis (HT) (1999) test is similar to the LLC test in that it assumes that all panels have the same autoregressive parameter so that the alternative hypothesis is simply rho < 1. Differing from the LLC test, the HT test assumes that the number of time periods, T, is fixed.

Like the LLC test, the HT test requires that the panels be strongly balanced.

Baltagi (2008, 278) mentions that T being fixed is the typical case in micropanel studies. Here you may have a panel dataset of firms, and it may be more natural to think that if you could increase the sample size of your dataset, you would do so by collecting data on more firms, though the number of time periods available for each firm is fixed.

Breitung test

The LLC and HT tests are based on regression t statistics that are subsequently adjusted to reflect the fact that under the null hypothesis, the t statistics have a nonzero mean because of the inclusion of panel-specific means or trends. The Breitung (2000) test takes a different approach, transforming the data before computing the regressions so that the standard t statistics can be used.

The Breitung test requires that the panels be strongly balanced.

When the robust option is specified, a version of the t statistic that is robust to cross-sectional correlation of the error terms is reported. This statistic has an asymptotically normal distribution when first T tends to infinity followed by N tending to infinity.

The Breitung test assumes that all panels have a common autoregressive parameter. The null hypothesis is that all series contain a unit root. The alternative hypothesis is that rho < 1 so that the series are stationary. Breitung and Das (2005) remark that the test also has power in the heterogeneous case, where each panel is allowed to have its own autoregressive parameter, though the test is optimal in the case where all panels have the same autoregressive parameter.

The Breitung (2000) Monte Carlo simulations suggest that his test is substantially more powerful than other panel unit-root tests for the modest-size dataset he considered (N=20, T=30).

Im-Pesaran-Shin test

A major limitation of the LLC, HT, and Breitung tests is the assumption that all panels have the same value of rho. The Im-Pesaran-Shin (IPS) (2003) test relaxes the assumption of a common rho and instead allows each panel to have its own rho_i. The null hypothesis is that all panels have a unit root (Ho: rho_i = 0 for all i). The alternative hypothesis is that the fraction of panels that are stationary is nonzero. Specifically, if we let N_1 denote the number of stationary panels, then the fraction N_1/N tends to a nonzero fraction as N tends to infinity. This allows some (but not all) of the panels to possess unit roots under the alternative hypothesis.

The IPS test does not require strongly balanced data, but there can be no gaps in each individual time series.

When the errors are assumed to be serially uncorrelated, imposed by either specifying the lags(0) option or not specifying the lag() option at all, xtunitroot ips reports IPS's t-bar, t-tilde-bar, and Z_t-tilde-bar statistics. These statistics assume that the number of time periods, T, is fixed. When there are no gaps in the data, xtunitroot ips reports exact critical values for the t-bar statistic that are predicated on the number of panels, N, also being fixed. The other two statistics assume N tends to infinity.

For the asymptotic normal distribution of Z_t-tilde-bar to hold, T must be at least 5 if the dataset is strongly balanced and the deterministic part of the model includes only panel-specific means, or at least 6 if time trends are also included. If the data are not strongly balanced, then T must be at least 9 for the asymptotic distribution to hold. If these limits on T are not met, the p-value for Z_t-tilde-bar is not reported.

When serial correlation in the error terms is accommodated by using the lags() option with xtunitroot ips, then IPS's W_t-bar statistic is reported. This statistic is asymptotically normally distributed when first T tends to infinity followed by N tending to infinity.

Fisher-type tests

Fisher-type tests approach testing for panel-data unit roots from a meta-analysis perspective. That is, these tests conduct unit-root tests for each panel individually, and then combine the p-values from these tests to produce an overall test. xtunitroot fisher supports ADF tests with the dfuller option and Phillips-Perron tests with the pperron option. Any options allowed by dfuller or pperron can be specified (except the regress option has no effect).

xtunitroot fisher does not require strongly balanced data, and the individual series can have gaps.

These tests assume that T tends to infinity. If the number of panels, N, is fixed, then these tests are consistent against the alternative that at least one panel is stationary. If we allow N to tend to infinity, then the number of panels that do not have a unit root must grow at the same rate as N for the tests to be consistent.

xtunitroot fisher combines p-values using the inverse chi-squared, inverse-normal, and inverse-logit transformations. Also a modified version of the inverse chi-squared transformation proposed by Choi (2001) is reported for use when N is believed to tend to infinity, because here the standard inverse chi-squared test statistic goes to infinity.

Hadri LM stationarity test

All the tests discussed thus far have as the null hypothesis that the data contain a unit root. As Hadri (2000) notes, classical hypothesis testing requires strong evidence to the contrary to reject the null hypothesis. Thus we may also want to conduct a test in which the null and alternative hypotheses are reversed, to help confirm or deny conclusions based on tests with the null hypothesis being nonstationarity.

The Hadri LM test requires that the panels be strongly balanced.

The Hadri LM test has as the null hypothesis that all the panels are stationary, perhaps around a linear trend if the trend option is specified. The alternative hypothesis is that at least some of the panels contain a unit root. The test assumes that the model error terms are normally distributed. The test is justified asymptotically as T tends to infinity followed by N tending to infinity. Hadri states that his tests are appropriate for panel datasets in which T is large and N is moderate, such as the Penn World Tables frequently used for cross-country comparisons.

Examples

Setup . webuse pennxrate

LLC test, using the AIC to choose the number of lags for regressions and using an HAC variance estimator based on the Bartlett kernel and the number of lags chosen using Newey and West's method . xtunitroot llc lnrxrate if oecd, demean lags(aic 10) kernel(bartlett nwest)

HT test, removing cross-sectional means from data . xtunitroot ht lnrxrate, demean

Robust version of the Breitung test on a subset of OECD countries, using 3 lags for the prewhitening step . xtunitroot breitung lnrxrate if g7, lags(3) robust

IPS test, using the AIC to choose the number of lags for regressions . xtunitroot ips lnrxrate, lags(aic 5)

Fisher-type test based on ADF tests with 3 lags, allowing for a drift term in each panel . xtunitroot fisher lnrxrate, dfuller lags(3) drift

Hadri LM test of stationarity, using an HAC variance estimator based on the Parzen kernel with 5 lags . xtunitroot hadri lnrxrate, kernel(parzen 5)

Stored results

xtunitroot llc stores the following in r():

Scalars r(N) number of observations r(N_g) number of groups r(N_t) number of time periods r(sig_adj) standard deviation adjustment r(mu_adj) mean adjustment r(delta) pooled estimate of delta r(se_delta) pooled standard error of delta hat r(Var_ep) variance of whitened differenced series r(sbar) mean of ratio of long-run to innovation standard deviations r(ttilde) observations per panel after lagging and differencing r(td) unadjusted t_delta statistic r(p_td) p-value for t_delta r(tds) adjusted t_delta_star statistic r(p_tds) p-value for t_delta_star r(hac_lags) lags used in HAC variance estimator r(hac_lagm) average lags used in HAC variance estimator r(adf_lags) lags used in ADF regressions r(adf_lagm) average lags used in ADF regressions

Macros r(test) llc r(hac_kernel) kernel used in HAC variance estimator r(hac_method) HAC lag-selection algorithm r(adf_method) ADF regression lag-selection criterion r(demean) demean, if the data were demeaned r(deterministics) noconstant, constant, or trend

xtunitroot ht stores the following in r():

Scalars r(N) number of observations r(N_g) number of groups r(N_t) number of time periods r(rho) estimated rho r(Var_rho) variance of rho under H_0 r(mean_rho) mean of rho under H_0 r(z) z statistic r(p) p-value

Macros r(test) ht r(demean) demean, if the data were demeaned r(deterministics) noconstant, constant, or trend r(altt) altt, if altt specified

xtunitroot breitung stores the following in r():

Scalars r(N) number of observations r(N_g) number of groups r(N_t) number of time periods r(lambda) test statistic lambda r(lrobust) robust test statistic lambda_R r(p) p-value for lambda r(p_lrobust) p-value for lambda_R r(lags) lags used for prewhitening

Macros r(test) breitung r(demean) demean, if the data were demeaned r(robust) robust, if specified r(deterministics) noconstant, constant, or trend

xtunitroot ips stores the following in r():

Scalars r(N) number of observations r(N_g) number of groups r(N_t) number of time periods r(tbar) test statistic t-bar r(cv_10) exact 10% critical value for t-bar r(cv_5) exact 5% critical value for t-bar r(cv_1) exact 1% critical value for t-bar r(zt) test statistic Z_t-bar r(ttildebar) test statistic t-tilde-bar r(zttildebar) test statistic Z_t-tilde-bar r(p_zttildebar) p-value for Z_t-tilde-bar r(wtbar) test statistic W_t-bar r(p_wtbar) p-value for W_t-bar r(lags) lags used in ADF regressions r(lagm) average lags used in ADF regressions

Macros r(test) ips r(demean) demean, if the data were demeaned r(adf_method) ADF regression lag-selection criterion r(deterministics) constant or trend

xtunitroot fisher stores the following in r():

Scalars r(N) number of observations r(N_g) number of groups r(N_t) number of time periods r(P) inverse chi-squared P statistic r(df_P) P statistic degrees of freedom r(p_P) p-value for P statistic r(L) inverse logit L statistic r(df_L) L statistic degrees of freedom r(p_L) p-value for L statistic r(Z) inverse normal Z statistic r(p_Z) p-value for Z statistic r(Pm) modified inverse chi-squared P_m statistic r(p_Pm) p-value for P_m statistic

Macros r(test) fisher r(urtest) dfuller or pperron r(options) options passed to dfuller or pperron r(demean) demean, if the data were demeaned

xtunitroot hadri stores the following in r():

Scalars r(N) number of observations r(N_g) number of groups r(N_t) number of time periods r(var) variance of z under Ho r(mu) mean of z under Ho r(z) test statistic z r(p) p-value for z r(lags) lags used for HAC variance

Macros r(test) hadri r(demean) demean, if the data were demeaned r(robust) robust, if specified r(kernel) kernel used for HAC variance r(deterministics) constant or trend

References

Baltagi, B. H. 2008. Econometric Analysis of Panel Data. 4th ed. New York: Wiley.

Breitung, J. 2000. The local power of some unit root tests for panel data. In Advances in Econometrics, Volume 15: Nonstationary Panels, Panel Cointegration, and Dynamic Panels, ed. B. H. Baltagi, 161-178. Amsterdam: JAI Press.

Breitung, J., and S. Das. 2005. Panel unit root tests under cross-sectional dependence. Statistica Neerlandica 59: 414-433.

Choi, I. 2001. Unit root tests for panel data. Journal of International Money and Finance 20: 249-272.

Hadri, K. 2000. Testing for stationarity in heterogeneous panel data. Econometrics Journal 3: 148-161.

Harris, R. D. F., and E. Tzavalis. 1999. Inference for unit roots in dynamic panels where the time dimension is fixed. Journal of Econometrics 91: 201-226.

Im, K. S., M. H. Pesaran, and Y. Shin. 2003. Testing for unit roots in heterogeneous panels. Journal of Econometrics 115: 53-74.

Levin, A., C.-F. Lin, and C.-S. J. Chu. 2002. Unit root tests in panel data: Asymptotic and finite-sample properties. Journal of Econometrics 108: 1-24.

Newey, W. K., and K. D. West. 1994. Automatic lag selection in covariance matrix estimation. Review of Economic Studies 61: 631-653.


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index