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

2 ビュー (過去 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 日
Many Thanks!!
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 Center および File ExchangeCointegration Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by