Description Usage Arguments Value Details References See Also Examples
The Rank-Based Test by Dufour & Roy (1985, 1986) for serial correlation.
1 | diag_dufour_roy(x, lags = c(8, 10, 12))
|
x |
An object of class |
lags |
The number of lags of cross-correlation matrices used in the
tests. Can take multiple values. Defaults to |
The results of the Rank-Based Test by Dufour & Roy as a
data.frame
.
Extreme observations in return series (heavy tails) can have pronounced effects on the results of Q*(m). One approach to circumvent the heavy tails problem is the Rank-Based test on the rank series of e_t by Dufour & Roy (1985, 1986). With R_t being the rank of e_t, the lag-l rank autocorrelation of e_t can be defined as
ρ_l = (∑_{t=l+1}^T * (R_t - R) * (R_{t-l} - R)) / (∑_{t=1}^T * (R_t - R)²) for l = 1, 2, ...,
where
R = ∑_{i=1}^T * R_T/ T = (T + 1) / 2,
∑_{t=1}^T * (R_t - R)² = T * (T² - 1) / 12.
It can be shown that
E(ρ_l) = -(T - l) / [T(T - 1)]
Var(ρ_l) = (5T^4 - (5l + 9)T³ + 9 * (l - 2) * T² + 2l * (5l + 8) * T + 16l²) / (5(T - 1)² * T² * (T + 1))
The Test Statistic
Q_R(m) = ∑_{i=1}^m * [([ρ_{i} - E(ρ_i)]²] / Var(ρ_i)]
is distributed as χ²_m asymptotically if e_t is serially uncorrelated.
Dufour, J. M. & Roy R. (1985). The t copula and related copulas. Working Paper. Department of Mathematics, Federal Institute of Technology.
Dufour, J. M. & Roy R. (1986). Generalized portmanteau statistics and tests of randomness. Communications in Statistics-Theory and Methods, 15: 2953-2972.
Li, W. K. (2004). Diagnostic Checks in Time Series. Chapman & Hall / CRC. Boca Raton, FL.
Tsay, R. S. (2014). Multivariate Time Series Analysis with R and Financial Applications. John Wiley. Hoboken, NJ.
Tsay, R. S. (2015). MTS: All-Purpose Toolkit for Analyzing Multivariate Time Series (MTS) and Estimating Multivariate Volatility Models. R package version 0.33.
diag_std_et
& diag_std_et_cnd
for the
transformation to the input-series for x
1 2 3 4 5 6 7 8 9 10 | # create heteroscedastic data
dat <- mgarchBEKK::simulateBEKK(3, 500)
eps <- data.frame(eps1 = dat$eps[[1]], eps2 = dat$eps[[2]],
eps3 = dat$eps[[3]])
# transform to standardized residuals
et <- diag_std_et(eps)
# perform rank based test (dufour & roy)
diag_dufour_roy(et)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.