pp: Phillips and Perron Unit Root Test

View source: R/uroot_breaks.R

ppR Documentation

Phillips and Perron Unit Root Test

Description

Implement the Phillips-Perron (1988) PP unit root test, including both Za (Z-alpha) and Zt (Z-tau) statistics. This wrapper allows inputting additional deterministic part, for example season dummies, but the asymptotic critical values are not available.

Usage


pp(y,type=c("none","const","trend"),d=NULL,lags=c("short","long","nill"),use=c("nw","ba"))

Arguments

y

Vector to be tested for a unit root.

type

The deterministic parts in the test regression.

d

Additional deterministic parts in addition to "type"" in the test regression.

lags

Lags used for correction of error term. See section "details" below.

use

User specified lags for correction of error term. See section "details" below.The default is the lag determined by Newey-West bandwidth ("nw") with Bartlett kernel ("ba").

Details

lags="short" sets the number of lags to \sqrt[4]{4 \times (n/100)}, whereas lags="long" sets the number of lags to \sqrt[4]{12 \times (n/100)}. If lags="nil" is choosen, no error correction is made.

Furthermore, "lags" and "use" are mutually exclusive: As long as "use" is not set to be NULL, its argument will be chosen first. One can specify a different number of maximum lags by setting "use" accordingly. Users can input number of your souce. This version suports two bandwidth functions: "nw" for Newey-West and "and" for Andrews. The kernel functions are supported: "ba"=Bartlett, "pa"=Parzen, "qs"=Qudratic Spectral

Value

Zt

The Z-tau test statistic.

cvZt

Critical values of Zt.

Za

The Z-alpha test statistic.

cvZa

Critical values of Za.

lag

Number of lags used for kernel function.

resid

Regression residuals.

Note

This code modifies function ur.pp of package urca, which does not have relevant critical values for "Z-alpha" test statistic.

Author(s)

Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.

References

Phillips, P.C.B. and Perron, P. (1988) Testing for a unit root in time series regression. Biometrika, 75(2), 335-346.
MacKinnon, J.G. (1991) Critical Values for Cointegration Tests- Long-Run Economic Relationships, eds. R.F. Engle and C.W.J. Granger, London, Oxford, 267-276.

Examples

data(macro)
y=macro[,"INF"]
pp(y,
   type=c("none","const","trend")[3],
   lags = c("short", "long", "nil")[2],
   use=c("nw","ba")) # If argument "use" is NOT NULL, argument lags will be ignored.

pp(y,lags = c("short", "long", "nil")[2],
   type=c("none","const","trend")[3],
   use=NULL)

pp(y,lags = c("short", "long", "nil")[2],
   type=c("none","const","trend")[3],
   use=18)

COINT documentation built on Sept. 9, 2025, 5:51 p.m.

Related to pp in COINT...