welch: Welch seasonality test In seastests: Seasonality Tests

Description

Test for seasonality in a time series using Welch's ANOVA test.

Usage

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

Arguments

 x time series freq Frequency of the time series diff Shall the differenced series be tested? residuals Shall the residuals of an ARIMA model be tested? autoarima Use automatic instead of a (0,1,1) ARIMA model? rank Use rank of series instead of actual values?

Details

If residuals=FALSE the autoarima parameter is ignored.

If rank=TRUE, the test becomes basically a combination of the Kruskall-Wallis and the Welch test.

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.

Daniel Ollech

References

Kruskal, W. H. and W. A.Wallis (1952). Use of Ranks in One-Criterion Variance Analysis. Journal of the American Statistical Association 47 (260), 583-621.

Welch, B. L. (1951). On the Comparison of Several Mean Values: An Alternative Approach. Biometrika 38 (3/4), 330-336.

Examples

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

Example output

Test used:  Kruskall Wallis

Test statistic:  1.49
P-value:  0.1722627
Test used:  Kruskall Wallis

Test statistic:  0.57
P-value:  0.7566941

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