check_residuals: Check model used in OCSB test

Description Usage Arguments Details Author(s) References Examples

View source: R/check_residuals.R

Description

Test the residuals of the model used for the OCSB test for serial correlation.

Usage

1

Arguments

x

results of ocsb test

plot

boolean, should barplot be printed?

Details

The residuals of the model used for the OCSB test should ideally be white noise. Here the Ljung-Box statistic is calculated and shown for all lags up to 2 times the frequency of the series. Be aware that the Ljung-Box statistic is a 'cumulative test'. For instance, the p-value of the Ljung-Box statistic for lag 3 is based on the null hypothesis, that the autocorrelations of the first three lags are jointly zero.

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(100, 10,10), frequency=12), nrun=100)
check_residuals(teststat)

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