Nyblom-Harvey panel test of common stochastic trends
nharvey varname [if exp] [in range] [ , Vlags({itnumlist}) trend nolrv ]
nharvey is for use with panel data. You must tsset your data before using nharvey, using the panel form of tsset; see help tsset.
varname may contain time-series operators; see help varlist.
Description
nharvey estimates one form of the test of common stochastic trends developed by Nyblom and Harvey (NH, 2000). The test is of the validity of a specified value of the rank of the covariance matrix of the disturbances driving the multivariate random walk. This rank is equal to the number of common trends, or levels, in the series. As NH show, "this test is very simple insofar as it does not require any models to be estimated, even if serial correlation is present." (p.176) The special case calculated by nharvey is that of the rank (K in NH' terms) equalling zero, which may be taken as a test that there are no common trends among the variables. NH state that "common trends imply cointegration, and vice versa." Thus a failure to reject the null hypothesis of zero common trends is also an indication that the variables do not form a cointegrated combination.
The test may be considered as a generalization of the Nyblom and Makelainen (19 > 83) and Kwiatkowski et al. (1992, kpss) univariate tests for stationarity of a series. Those tests are of the null hypothesis that the series is stationary, or statio > nary around a deterministic trend, against the alternative that a random walk compon > ent is present. nharvey considers the same structure in the context of multiple time series. By default the routine calculates the test statistic for both IID > errors and errors allowed to be serially correlated, using an estimate of the long-run variance derived from the spectral density matrix at frequency zero.
The critical values for nharvey for the constant and trend case are tabulated in NH, 2000. They show that the asymptotic distribution of the test statistic d > epends only on the number of series (N) and the hypothesized number of common trends. The critical values for (K=0) of NH Tables 1 and 2 have been extended for additional values of N via simulation of the asymptotic distribution (programs available on request). nharvey may be extended to test the hypothesis that the rank of the covariance matrix, (K) takes on a certain value, less than N (the number of series), against the alternative that it has a greater value. That extension is left to > future development.
Options
trend includes a time trend in the model (NH Table 2 for K=0).
vlags specifies a list of lags to be used in calculating the long-run variance. If this option is not specified, m, the truncation point in NH Eqn. 16, is calculated as T^0.25. If a list of lags is provided (perhaps with a local macro), the long-run variance matrix and resulting test statistic is calculated for each value of vlags.
nolrv omits the calculation of the statistic using a long-run variance estimator. For a large sample size (T), the calculation of this statistic involves a very sizable amount of computation, and the routine will be very slow.
Examples
. use http://fmwww.bc.edu/ec-p/data/hayashi/sheston91.dta,clear
. nharvey rgdppc if country<11
. nharvey rgdppc if country<11, vlag(2(2)6)
. nharvey D.rgdppc if country<11, trend
References
Kwiatkowski, D., Phillips, P.C.B., Schmidt, P. and Y. Shin. Testing the null hypothesis of stationarity against the alternative of a unit root: How sure are we that economic time series have a unit root? Journal of Econometrics, 54, 1992, 159-178.
Nyblom, Jukka and Andrew Harvey. Tests of common stochastic trends. Econometric Theory, 16, 2000, 176-199.
Nyblom, Jukka, and T. Makelainen. Comparison of tests for the presence of random walk coefficients in a simple linear model. Journal of the American Statistical Association, 78, 1983, 856-864.
Acknowledgements
We thank Jukka Nyblom for clarifications on the calculation of critical values for the routine, and pointing out typographical errors in the article. W > e are also very grateful to Nina Jones for detecting and diagnosing an error in the computations and benchmarking our corrected code against her MATLAB code. Remaining errors are our own.
Authors
Christopher F Baum, Boston College, USA, baum@bc.edu Fabian Bornhorst, European University Institute, Italy, Fabian.Bornhorst@iue.it
Also see
On-line: kpss (if installed), hadrilm (if installed), madfuller (if