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

조회 수: 7 (최근 30일)
Lisa J.
Lisa J. 2015년 10월 26일
댓글: Lisa J. 2015년 11월 5일
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?

채택된 답변

Hang Qian
Hang Qian 2015년 11월 4일
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
Lisa J.
Lisa J. 2015년 11월 5일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (4개)

Nick Hobbs
Nick Hobbs 2015년 10월 28일
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. 2015년 10월 29일
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 2015년 10월 29일
Spec = vgxset(...,'Qsolve',true);
Best wishes
Torsten.

Lisa J.
Lisa J. 2015년 10월 29일
편집: Lisa J. 2015년 10월 29일
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
Torsten
Torsten 2015년 10월 29일
Then maybe you should contact MATLAB support to help you with this issue.
Best wishes
Torsten.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by