portman.Q | R Documentation |
portman.Q uses the cumulative ACF to test for whiteness of a time series.
portman.Q(x, K)
x |
A time series (vector without missing values). |
K |
the maximum lag of the ACF to be used in the test. |
This is the Ljung-Box version of the the Portmanteau test for whiteness (Tong 1990). It may in particular be useful to test for whiteness in the residuals from time series models.
A vector is returned consisting of the asymptotic chi-square value, the associated d.f. and asymptotic p.val for the test of whiteness.
Tong, H. (1990) Non-linear time series : a dynamical system approach. Clarendon Press, Oxford.
data(plodia)
portman.Q(sqrt(plodia), K = 10)
fit <- ar(sqrt(plodia))
portman.Q(na.omit(fit$resid), K = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.