LBStat {PRTest} | R Documentation |
LBStat(a, lags = seq(5, 40, 5))
a |
time series |
lags |
lags at which the portmanteau statistic is evaluated |
The statistic
Q_m = n (n+2) sum_{k=1}^m frac{r^2_k}{n-k}
where r_k is the autocorrelation at lag k and n is the length of the time series. The use of squared residuals for detecting nonlinearity and ARCH-like effects is discussed in Li (2004).
A.I. McLeod
Ljung, G.M. and Box, G.E.P. (1979). The Likelihood Function of Stationary Autoregressive-Moving Average Models. Biometrika 66, 265-270.
Li, W.K. (2004). Diagnostic Checks in Time Series. Chapman & Hall/CRC.
data(DEXCAUS) r<-Returns(DEXCAUS) LBStat(r, lags=c(10,25,50))