How to get the expected Hessian variance-covariance matrix from vgxvarx?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Lisa J.
el 26 de Oct. de 2015
Comentada: Lisa J.
el 5 de Nov. de 2015
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?
0 comentarios
Respuesta aceptada
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
Más respuestas (4)
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?
0 comentarios
Ver también
Categorías
Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!