Page 1 of 1

MVQSTAT—multivariate Q statistic

Posted: Mon Jan 23, 2012 9:13 pm
by TomDoan
@MVQSTAT computes the Hosking(1981) variant of the multivariate Q statistic: "Equivalent Forms of the Multivariate Portmanteau Statistic", JRSS-B, vol 43, no. 2, pp 261-262.

Detailed Description

Re: MVQSTAT - multivariate Q statistic

Posted: Thu Aug 29, 2013 2:54 am
by miao
Hi Tom,

When testing autocorrelation of the residual via Portmanteau test, there seem to be two choices for the degree of freedom: k^2*h for a general model and k^2(h-p) for a VAR model, where k is the number of dimension, h is the max lag for autocorrelation and p is the lag for VAR. For example, in a bivariate VAR(4) the degrees of freedom k^2(h-p)=2^2(h-4).

What is the intuition behind the degree of freedom reduction (-p) in the context of VAR model? Is it because the lagging behavior has been addressed in VAR, and the test should be stricter (null hypothesis of no autocorrelation rejected more easily) ?

Re: MVQSTAT - multivariate Q statistic

Posted: Thu Aug 29, 2013 8:17 am
by TomDoan
miao wrote: What is the intuition behind the degree of freedom reduction (-p) in the context of VAR model? Is it because the lagging behavior has been addressed in VAR, and the test should be stricter (null hypothesis of no autocorrelation rejected more easily) ?
Correct. That's the number of parameters that have already been used in reducing the serial correlation.

Re: MVQSTAT - multivariate Q statistic

Posted: Thu Aug 29, 2013 8:12 pm
by miao
Hi Tom,

Thanks very much for your reply. Could we use this multivariate Q statistic to test the autocorrelation among the residuals in the GARCH-in-mean VAR (Elder 2010) with degree of freedom = k^2(h-p)=2^2(h-p), where p is the lag of the VAR structure of the model?

In practice, do people just look at the test result for one value of h, e.g., h= min(N/2-2,40) by literature recommendation , where N is the number of observations, or look at the results for many values of h?
Thanks,

Miao

Re: MVQSTAT - multivariate Q statistic

Posted: Thu Aug 29, 2013 8:21 pm
by TomDoan
You would have to apply it to (some set of) standardized residuals, but yes.

Usually just one set of lag lengths. For residuals from a VAR, I would probably do a relatively short number of lags (maybe 4) because if the lag length of the VAR is inadequate, that should show up in the first few lags of the residuals.

Re: MVQSTAT - multivariate Q statistic

Posted: Thu Aug 29, 2013 9:40 pm
by miao
Thanks. In the RATS program of Elder (2010) , should we test on the pair (U(1) , U(2))?

Re: MVQSTAT - multivariate Q statistic

Posted: Thu Aug 29, 2013 10:04 pm
by TomDoan
No. You would want to test the standardized residuals produced by the full model. Those aren't being saved right now---it would be the values of VX saved into series.

Re: MVQSTAT - multivariate Q statistic

Posted: Tue Sep 03, 2013 8:50 pm
by miao
Thanks for your reply, Tom.
How could the program be modified so that it produces the whole series of the residuals and the series are available in View --> Series Window --> VX? Sorry that I am a new to RATS, and the only related line I find in the program is

frml garchmlogl = hhv=SVARHVMatrix(t),sqrthoil=sqrt(hhv(t)(1,1)),$
vx=bb*%xt(y,t)-SVARRHSVector(t),vv=%outerxx(vx),%logdensity(hhv,vx)


Thanks!

Re: MVQSTAT - multivariate Q statistic

Posted: Sun Oct 14, 2018 7:55 pm
by TomDoan
miao wrote:Thanks for your reply, Tom.
How could the program be modified so that it produces the whole series of the residuals and the series are available in View --> Series Window --> VX? Sorry that I am a new to RATS, and the only related line I find in the program is

frml garchmlogl = hhv=SVARHVMatrix(t),sqrthoil=sqrt(hhv(t)(1,1)),$
vx=bb*%xt(y,t)-SVARRHSVector(t),vv=%outerxx(vx),%logdensity(hhv,vx)


Thanks!
This is from the programs at http://www.estima.com/forum/viewtopic.php?f=8&t=1189. Before the instruction above add:

dec vect[series] vstd(2)
clear(zeros) vstd

Then change the above instruction to

frml garchmlogl = hhv=SVARHVMatrix(t),sqrthoil=sqrt(hhv(t)(1,1)),$
vx=bb*%xt(y,t)-SVARRHSVector(t),%pt(vstd,t,vx./%xdiag(hhv(t))),vv=%outerxx(vx),%logdensity(hhv,vx)

That creates and saves VSTD(1) and VSTD(2) as the standardized (and orthogonalized) residuals.

Re: MVQSTAT—multivariate Q statistic

Posted: Mon Dec 10, 2018 2:23 am
by Jules89
Dear Tom,

I am a bit confused about the use of the mvqstat procedure. Lets say I have two return series and estmate a GARCH-BEKK(1,1), where the mean equation would be a bivariate VAR(3). Would the corret DFC be 3 (lag-length) or 2*2*3 (#-of total lag coefficients)?

Best

Jules

Re: MVQSTAT—multivariate Q statistic

Posted: Mon Dec 10, 2018 7:52 am
by TomDoan
2*2*3