MVQSTAT—multivariate Q statistic

Use this forum to post complete RATS "procedures". Please be sure to include instructions on using the procedure and detailed references where applicable.
Post Reply
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

MVQSTAT—multivariate Q statistic

Post 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
miao
Posts: 20
Joined: Mon Mar 25, 2013 9:44 pm

Re: MVQSTAT - multivariate Q statistic

Post 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) ?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: MVQSTAT - multivariate Q statistic

Post 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.
miao
Posts: 20
Joined: Mon Mar 25, 2013 9:44 pm

Re: MVQSTAT - multivariate Q statistic

Post 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
Last edited by miao on Thu Aug 29, 2013 8:24 pm, edited 1 time in total.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: MVQSTAT - multivariate Q statistic

Post 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.
miao
Posts: 20
Joined: Mon Mar 25, 2013 9:44 pm

Re: MVQSTAT - multivariate Q statistic

Post by miao »

Thanks. In the RATS program of Elder (2010) , should we test on the pair (U(1) , U(2))?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: MVQSTAT - multivariate Q statistic

Post 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.
miao
Posts: 20
Joined: Mon Mar 25, 2013 9:44 pm

Re: MVQSTAT - multivariate Q statistic

Post 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!
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: MVQSTAT - multivariate Q statistic

Post 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.
Jules89
Posts: 140
Joined: Thu Jul 14, 2016 5:32 am

Re: MVQSTAT—multivariate Q statistic

Post 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
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: MVQSTAT—multivariate Q statistic

Post by TomDoan »

2*2*3
Post Reply