ocsb: OCSB test

Description Usage Arguments Details Author(s) References Examples

View source: R/ocsb.R

Description

Test for seasonal unit root roots in a time series.

Usage

1
2
ocsb(x, method = "OLS", augmentations = c(3, 0), freq = NA, nrun = 1000,
  seed = 123)

Arguments

x

time series

method

"OLS" or "ML"

augmentations

non-seasonal and seasonal order of the augmentations

freq

frequency to be tested

nrun

number of runs in monte carlo simulation

seed

seed for monte carlo simulated based generation of null distribution

Details

The null hypothesis of the OCSB is that a series contains a seasonal unit root. This is tested by a Dickey-Fuller type regression. The test regression has often to be augmented by autocorrelational terms to ensure white noise of the error terms.

If seasonal lags are included and method='OLS' the test regression is calculated by OLS, so only the seasonal lags are included. If instead of 'OLS' method='ML' a seasonal AR model is calculated, which implies that high-order non-seasonal lags will be indirectly included as well (see Box and Jenkins, 1970). For seasonal augmentations, ML is quite a bit slower than OLS. The run time can be speeded up by reducing the number of runs of the monte carlo simulation (e.g. nrun=100).

Under the null hypothesis the test statistic follows a non-standard distribution and thus needs to be simulated. The number of runs and the seed can be changed.

Author(s)

Daniel Ollech

References

Box, G. and G. Jenkins (1970). Time Series Analysis: Forecasting and Control. San Francisco: Holden-Day.

Osborn D.R., Chui A.P.L., Smith J., and Birchenhall C.R. (1988). Seasonality and the order of integration for consumption, Oxford Bulletin of Economics and Statistics 50(4):361-377.

Examples

1
2
teststat <- ocsb(ts(rnorm(70, 10,10), frequency=7), nrun=200)
check_residuals(teststat)

seastests documentation built on May 2, 2019, 2:37 a.m.