MVJB Procedure |
@MVJB computes a multivariate version of the Jarque-Bera test for normality. Note that there are more sophisticated versions of this (for instance, Doornik and Hansen, "An Omnibus Test for Univariate and Multivariate Normality"). This just transforms the input residual series to uncorrelated components (using an eigenbased factorization if not provided by the user) and sums up the univariate JB statistics from those.
@MVJB has a maintained assumption that the residuals are i.i.d. both under the null and the alternative, so you want to check for serial correlation (@MVQSTAT) and possibly for lack of stability (@CVSTABTEST) first—if you reject either, then the @MVJB test is invalid.
@MVJB( options ) start end
# list of series
Parameters
|
start, end |
Range for the calculation [by default, the maximum combined range of the list of series |
Options
Note: one of these must be supplied.
SIGMA=SYMMETRIC covariance matrix of u
FACTOR=RECTANGULAR factor of the covariance matrix of u.
HMATRICES=SERIES[SYMM] of time-varying covariance matrices.
[PRINT]/NOPRINT
TITLE="title of report" ["Multivariate JB Test"]
Variables Defined
|
%CDSTAT |
Joint test statistic (REAL) |
|
%SIGNIF |
Significance level of %CDSTAT (as a chi-squared) (REAL) |
|
%NDFTEST |
Degrees of freedom for joint test (INTEGER) |
Example
This is part of the replication file for Hafner and Herwartz(2006). This tests the jointly standardized (using an eigen-based factorization) residuals from a GARCH model. Because the standardization produces (theoretically) a set of transformed residuals with an identity covariance matrix, so that is included on the SIGMA option on the procedure call.
equation demeqn demret
# constant demret{1}
equation gbpeqn gbpret
# constant gbpret{1}
group uniar1 demeqn gbpeqn
garch(model=uniar1,mv=bekk,rvectors=rv,hmatrices=hh,$
stdresids=stdmvu,factorby=eigen)
*
* Do a multivariate J-B test using the jointly standardized
* residuals from GARCH
*
@mvjb(sigma=%identity(%nvar))
# stdmvu
Sample Output
This is the output from the example. @MVJB standardizes the GARCH residuals to uncorrelated components using an eigen factorizations of the GARCH covariance matrices (the HH matrices). The first row is the JB statistic (chi-squared(2)) on the first component, the second is for the second component, and the "All" row is the sum, which will be chi-squared(4) asymptotically.
Var JB P-Value
1 266.049 0.000
2 3293.457 0.000
All 3559.506 0.000
Copyright © 2025 Thomas A. Doan