Learn R Programming

feasts (version 0.5.0)

cointegration_phillips_ouliaris: Phillips and Ouliaris Cointegration Features

Description

cointegration_phillips_ouliaris() calls urca::ca.po() and returns a named numeric vector containing:

  • phillips_ouliaris_stat: the \(P_u\) or \(P_z\) test statistic; and

  • phillips_ouliaris_pvalue: an approximate p-value obtained by linearly interpolating the tabulated critical values in result@cval.

Since it returns a simple numeric vector, this function is suitable for use as a feature extractor within the fabletools features framework.

Usage

cointegration_phillips_ouliaris(x, ...)

Value

A named numeric vector of length two:

  • phillips_ouliaris_stat

  • phillips_ouliaris_pvalue

Arguments

x

A numeric matrix (or object coercible to a matrix) of time series to be tested for cointegration. Columns represent series and rows represent ordered observations.

...

Additional arguments passed to urca::ca.po(), such as demean, lag, type, and tol. See ca.po for details.

Details

Compute Phillips and Ouliaris (1990) residual-based cointegration test statistics and an approximate p-value as numeric features.

This is a small wrapper around urca::ca.po() designed so that the Phillips–Ouliaris test can be used directly inside features.

The function requires the urca package; an informative error is raised if it is not installed.

The p-value is computed by interpolating over the first row of result@cval, which contains critical values at various significance levels (e.g., "10pct", "5pct", "1pct"). These labels are converted to probabilities (0.10, 0.05, 0.01), and approx is used to obtain the approximate p-value at the observed test statistic. The interpolation is done with rule = 2, implying linear extrapolation outside the tabulated range.

References

Phillips, P.C.B. and Ouliaris, S. (1990), “Asymptotic Properties of Residual Based Tests for Cointegration”, Econometrica, 58(1), 165–193.

See Also

ca.po, features

Examples

Run this code

cointegration_phillips_ouliaris(cbind(mdeaths, fdeaths))

Run the code above in your browser using DataLab