PRStat {PRTest} | R Documentation |
The negative of the log of the determinant of
PRStat(res, lags = seq(5, 20, 5))
res |
residuals or series to be tested for randomness |
lags |
vector of lags at which to evaluate the test statistic |
Pena-Rodriguez introduced a portmanteau goodness-of-fit test based on the generalized variance of the standardized residuals. The (i,j)-entry of the corresponding covariance matrix is r[i-j], where r[k] denotes the residual autocorrelation at lag k. Pena and Rodriguez ( and 2006) and Lin and McLeod ( ) discuss various normalizations for obtaining the asymptotic distribution. Since Monte-Carlo simulations we can simply use the negative of the log of the determinant of the covariance matrix as our test statistic.
negative of the log of the determinant
A.I. McLeod
Lin, J.W. and McLeod, A.I. (2006). Improved Pena-Rodriguez Portmanteau Test. Computational Statistics and Data Analysis, 51, 1731-1738.
Lin, J.W. and McLeod, A.I. (2007, accepted). Portmanteau Tests for ARMA Models with Infinite Variance. Journal of Time Series Analysis.
Pev{n}a, D. and Rodriguez, J. (2002), A Powerful Portmanteau Test of Lack of Fit For Time Series. Journal of American Statistical Association 97, 601-610.
Pev{n}a, D. and Rodriguez, J. (2006). The Log of the Autocorrelation Matrix for Testing Goodness of Fit in Time Series. Journal of Statistical Inference and Planning 136, 2706-2718.
PRStat(rnorm(50))