Description Usage Arguments Details Value Note Author(s) References See Also Examples

Performs the Phillips-Perron test for the null hypothesis of a unit root of
a univariate time series `x`

(equivalently, `x`

is a non-stationary time series).

1 |

`x` |
a numeric vector or univariate time series. |

`type` |
the type of Phillips-Perron test. The default is |

`lag.short` |
a logical value indicating whether the parameter of lag to calculate the statistic is a short or long term. The default is a short term. |

`output` |
a logical value indicating to print the results in R console. The default
is |

Compared with the Augmented Dickey-Fuller test, Phillips-Perron test makes
correction to the test statistics and is robust to the unspecified autocorrelation
and heteroscedasticity in the errors. There are two types of test statistics,
*Z_{ρ}* and *Z_{τ}*, which have the same asymptotic distributions
as Augmented Dickey-Fuller test statistic, `ADF`

. The calculations of each type
of the Phillips-Perron test can be see in the reference below. If the
`lag.short = TRUE`

, we use the default number of Newey-West lags
*floor(4*(length(x)/100)^0.25)*,
otherwise *floor(12*(length(x)/100)^0.25)* to calculate the test statistics.
In order to calculate the test statistic, we consider
three types of linear regression models. The first type (`type1`

) is the one
with no drift and linear trend with respect to time:

*x[t] = ρ*x[t-1] + e[t],*

where *e[t]* is an error term.
The second type (`type2`

) is the one with drift but no linear trend:

*x[t] = μ + ρ*x[t-1] + e[t].*

The third type (type3) is the one with both drift and linear trend:

*x[t] = μ + α*t + ρ*x[t-1] + e[t].*

The p.value is calculated by the interpolation of test statistics from the critical values
tables (Table 10.A.1 for `Z_rho`

and 10.A.2 for `Z_tau`

in Fuller (1996))
with a given sample size *n* = length(`x`

).

A matrix for test results with three columns (`lag`

,`Z_rho`

or `Z_tau`

, `p.value`

) and three rows (`type1`

, `type2`

, `type3`

).
Each row is the test results (including lag parameter, test statistic and p.value) for
each type of linear equation.

Missing values are removed.

Debin Qiu

Phillips, P. C. B.; Perron, P. (1988). Testing for a Unit Root in Time Series Regression.
*Biometrika*, 75 (2): 335-346.

Fuller, W. A. (1996). Introduction to statistical time series, second ed., Wiley, New York.

`adf.test`

, `kpss.test`

, `stationary.test`

1 2 3 4 5 6 |

```
Attaching package: 'aTSA'
The following object is masked from 'package:graphics':
identify
Phillips-Perron Unit Root Test
alternative: stationary
Type 1: no drift no trend
lag Z_rho p.value
3 -97.8 0.01
-----
Type 2: with drift no trend
lag Z_rho p.value
3 -97.7 0.01
-----
Type 3: with drift and trend
lag Z_rho p.value
3 -97.6 0.01
---------------
Note: p-value = 0.01 means p.value <= 0.01
Phillips-Perron Unit Root Test
alternative: stationary
Type 1: no drift no trend
lag Z_rho p.value
5 0.141 0.723
-----
Type 2: with drift no trend
lag Z_rho p.value
5 -2.14 0.752
-----
Type 3: with drift and trend
lag Z_rho p.value
5 -92.7 0.01
---------------
Note: p-value = 0.01 means p.value <= 0.01
```

aTSA documentation built on May 29, 2017, 11:44 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.