tseries (version 0.1-2)

pp.test: Phillips-Perron Unit Root Test

Description

Computes the Phillips-Perron test for the null that x has a unit root. The general regression equation which incorporates a constant and a linear trend is used and the corrected t-statistic for a first order autoregressive coefficient equals one is computed. To estimate sigma^2 the Newey-West estimator is used. If shortl is TRUE, then the truncation lag parameter is set to trunc(4*(n/100)^0.25), otherwise trunc(12*(n/100)^0.25) is used. The p-values are interpolated from Table 4.2, p. 103 of Banerjee et al. (1993). Missing values are not handled.

Usage

pp.test (x, lshort = TRUE)

Arguments

x
a numeric vector or time series.
shortl
a logical indicating whether the short or long version of the truncation lag parameter is used.

Value

  • A list with class "htest" containing the following components:
  • statisticthe value of the test statistic.
  • parameterthe truncation lag parameter.
  • p.valuethe p-value of the test.
  • methoda character string indicating what type of test was performed.
  • data.namea character string giving the name of the data.

References

A. Banerjee, J. J. Dolado, J. W. Galbraith, and D. F. Hendry (1993): Cointegration, Error Correction, and the Econometric Analysis of Non-Stationary Data, Oxford University Press, Oxford. P. Perron (1988): Trends and Random Walks in Macroeconomic Time Series. Journal of Economic Dynamics and Control 12, 297-332.

Examples

Run this code
x <- rnorm (1000)
pp.test (x)
y <- intgrt (x)
pp.test (y)

Run the code above in your browser using DataLab