Description Usage Arguments Details Value References See Also Examples
Apply four portmanteau test statistics to check the validity of a fitted multivariate volatility model.
1 | diag_mv_ch_model(x, lags = c(8, 10, 12), baq_err_cor = TRUE)
|
x |
A |
lags |
The number of lags used in the tests. Defaults to 10. |
baq_err_cor |
Logical switch if potential negative variances should be
handled for |
For the four test statistics employed check the details section of
link{mv_ch_tests}
. For the transformation of eps
& cnd_h
check the details section of diag_std_et_cnd
. For an
comprehensive explanation see the references, especially Tsay (2014).
Various test statistics and their p-values.
Ljung G. & Box G. E. P. (1978). On a measure of lack of fit in time series models. Biometrika 66: 67-72.
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.
Ling, S. & Li, W. K. (1997). Diagnostic checking of nonlinear multivariate time series with multivariate ARCH errors. Journal of Time Series Analysis, 18: 447–464.
Tse, Y. K. (2002). Residual-based diagnostics for conditional heteroscedasticity models. Econometric Journal, 5: 358–373.
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_cnd
, diag_dufour_roy
,
diag_ljung_box
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # create heteroscedastic data
dat <- mgarchBEKK::simulateBEKK(2, 150)
eps <- data.frame(eps1 = dat$eps[[1]], eps2 =dat$eps[[2]])
# fit a GARCH model
gjr <- mGJR(eps[, 1], eps[, 2])
# conditional covariance matrices
cnd_h <- matrix(unlist(gjr$H.estimated), ncol = 4, byrow = TRUE)
#diagnostics on estimated conditional covariance matrices
diag_mv_ch_model(x = list(as.matrix(eps), cnd_h))
#alternative for a fitted baq_nif object
baq <- baq_nifunction(gjr)
diag_mv_ch_model(baq)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.