pwn_McLeodLjungBox_test | R Documentation |
Compute the McLeod-Ljung-Box test statistic for examining the null hypothesis of periodic white noise.
pwn_McLeodLjungBox_test(acf, nepoch, use = 1:maxlag,
maxlag = ncol(as.matrix(acf)) - 1,
period = nrow(as.matrix(acf)), fitdf = numeric(period))
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. |
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.
A list containing the following components:
statistic |
the value of the test statistic for each lag
specified by |
df |
the corresponding degrees of freedom |
TODO: Consolidate this and similar tests!
There is a typo in \insertCite@@McLeod1994diagnostic, eq. (4.5);textualpcts, noted by \insertCiteMcLeod1995diagnosticCorrectionpcts.
Georgi N. Boshnakov
Box.test
for the non-periodic case
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.