qs: QS test

Description Usage Arguments Details Author(s) References Examples

View source: R/qs.R

Description

Test for seasonality in a time series.

Usage

1
qs(x, freq = NA, diff = T, residuals = F, autoarima = T)

Arguments

x

time series

freq

Frequency of the time series

diff

Shall the differenced series be tested?

residuals

Shall the residuals of ARIMA model be tested?

autoarima

Use automatic instead of a (0,1,1) ARIMA model?

Details

If residuals=FALSE the autoarima settings are ignored.

If residuals=TRUE, a non-seasonal ARIMA model is estimated for the time series. And the residuals of the fitted model are used as input to the test statistic. If an automatic order selection is used, the Hyndman-Khandakar algorithm is employed with max(p)=max(q) <= 3.

Author(s)

Daniel Ollech

References

Hyndman, R. J. and Y. Khandakar (2008). Automatic Time Series Forecasting: The forecast Package for R. Journal of Statistical Software 27 (3), 1-22.

Maravall, A. (2011). Seasonality Tests and Automatic Model Identification in TRAMO-SEATS. Bank of Spain.

Ollech, D. and Webel, K. (2020). A random forest-based approach to identifying the most informative seasonality tests. Deutsche Bundesbank's Discussion Paper series 55/2020.

Examples

1
2
qs(ts(rnorm(120, 10,10), frequency=12))
qs(ts(rnorm(1200, 10,10), frequency=7))

Example output

sh: 1: cannot create /dev/null: Permission denied
Test used:  QS 
 
Test statistic:  0 
P-value:  1
Test used:  QS 
 
Test statistic:  0 
P-value:  1

seastests documentation built on Sept. 18, 2021, 5:07 p.m.

Related to qs in seastests...