Learn R Programming

pcts (version 0.15.8)

pwn_McLeodLjungBox_test: McLeod-Ljung-Box test for periodic white noise

Description

Compute the McLeod-Ljung-Box test statistic for examining the null hypothesis of periodic white noise.

Usage

pwn_McLeodLjungBox_test(acf, nepoch, use = 1:maxlag,
                 maxlag = ncol(as.matrix(acf)) - 1,
                 period = nrow(as.matrix(acf)), fitdf = numeric(period))

Value

A list containing the following components:

statistic

the value of the test statistic for each lag specified by use.

df

the corresponding degrees of freedom

Arguments

acf

the sample periodic autocorrelation function of the time series.

nepoch

number of cycles used in computing the acf.

use

number of lags to use, may be a vector.

maxlag

maximal lag.

period

number of seasons in a cycle.

fitdf

degrees of freedom corrections for the number of estimated parameters, see Details.

Author

Georgi N. Boshnakov

Details

The McLeod-Ljung-Box test can be used to test the null hypothesis of periodic white noise.

If acf contains sample autocorrelations of residuals from a fitted model, a correction of the degrees of freedom is strongly recommended.

Argument fitdf is a vector specifying how may degrees of freedom to subtract for each season. In the case of PAR models fitdf can be set to the PAR orders.

The value of the statistic is set to NA where the correction for degrees of freedom results in negative numbers.

References

See Also

Box.test for the non-periodic case