How to get the expected Hessian variance-covariance matrix from vgxvarx?

2 visualizaciones (últimos 30 días)
I wish to perform a Wald test on a VAR model and I need the parameter covariance estimate. On the page http://de.mathworks.com/help/econ/model-comparison-tests.html I read the following: "The estimation function for multivariate models, vgxvarx, returns the expected Hessian variance-covariance matrix". However, I can only find the standard errors in EstStdErrors. How to get the expected Hessian variance-covariance matrix from vgxvarx?

Respuesta aceptada

Hang Qian
Hang Qian el 4 de Nov. de 2015
Hi Lisa,
The parameter covariance matrix is not an output variable of VGXVARX, while the standard errors are returned as the second output argument. The parameter covariance matrix is indeed computed inside VGXVARX using the expected Hessian variance-covariance matrix.
There is a simple way that you may retrieve the covariance matrix.
In the command window, type: edit vgxvarx
Then save a copy of the function in a folder that MATLAB can recognize, say the current directory. It is up to you whether to rename it or not.
Replace the first line [EstSpec,EstSE,logL,W] = vgxvarx(Spec,Y,X,Y0,varargin) by an additional output argument “xvar”:
[EstSpec,EstSE,logL,W,xvar] = vgxvarx(Spec,Y,X,Y0,varargin)
The last output argument is the estimated parameter covariance matrix. It does not change anything inside VGXVARX, but just requests the function to return the intermediate variable xvar, as you might need it for hypothesis testing.
Thank you.
Hang Qian
  2 comentarios
Lisa J.
Lisa J. el 5 de Nov. de 2015
I was wondering if it would be possible to get the same matrix ( or at least the pvalues) as output of ejcitest, when a VECM has to be estimated. I would need this matrix to assess parameters significance. Or maybe there is a smarter way to test for significance in this case? Thank you.

Iniciar sesión para comentar.

Más respuestas (4)

Nick Hobbs
Nick Hobbs el 28 de Oct. de 2015
When I follow the example on the 'vgxvarx' documentation page at the following link.
When I check 'EstSpec' I see an item called 'Q' which is labeled as a 'covariance matrix'. Is this the information you are looking for?

Lisa J.
Lisa J. el 29 de Oct. de 2015
Hi, thank you for answering. I really appreciate your help. Unfortunately Q is not what I am looking for. Q is the innovations covariance matrix. Instead, what is required for the Wald test is the covariance matrix of the estimated parameters. On the web page I've linked, I can read:
"The estimation function for multivariate models, vgxvarx, returns the expected Hessian variance-covariance matrix."
Computing the Hessian variance-covariance matrix, as explained, is one way to get the the covariance matrix of the estimated parameters. However, it seems that it is not among the vgxvarx output. The only thing that I can find is the square root of the diagonal of such matrix in EstStdErrors.

Torsten
Torsten el 29 de Oct. de 2015
Spec = vgxset(...,'Qsolve',true);
Best wishes
Torsten.

Lisa J.
Lisa J. el 29 de Oct. de 2015
Editada: Lisa J. el 29 de Oct. de 2015
Thank you.
Anyway, as I've already written in my previous answer, Q is not the matrix I am looking for. Just look at the dimension: Q is n x n where n = number of time series. The matrix I am looking for is k x k, where k = number of parameters, and the square diagonal indeed is a k x 1 vector returned in EstStdErrors. For example, this matrix is what is called "EstParamCov" for arima models output.
  1 comentario
Torsten
Torsten el 29 de Oct. de 2015
Then maybe you should contact MATLAB support to help you with this issue.
Best wishes
Torsten.

Iniciar sesión para comentar.

Categorías

Más información sobre Cointegration Analysis en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by