Hi Matlab,
I'm currently doing research on macroeconomic variables; hence attempting to solve an matrix equation in Matlab ( see attached photo, marked with yellow (following VECM Analysis in JMulTi July 5, 2005, page 26). Does anyone know to calculate the value for sigma (marked with yellow)?
I haven't attached a code, since, at the moment, don't know how to calculate it in Matlab, hence any help greatly appreciated!
Best regards,

 채택된 답변

Chuguang Pan
Chuguang Pan 2024년 3월 7일

0 개 추천

Using vectorization operator vec, which transfer a matrix to a column vector through stacking matrix's columns vertically. There is a useful equation in this context.
, where represents kronecker product.
The matrix equation can be converted to the following vector equation,
This vector equation can be solved with MATLAB, and you can reshape the to matrix .

댓글 수: 5

Simon Christensen
Simon Christensen 2024년 3월 7일
편집: Simon Christensen 2024년 3월 7일
Hi again
Thanks for you very reply!
Would you please explain how the above equation can be solved with Matlab?
According to the vector equation:
you can get the typical system of linear equations which is analogeous to :
Then you can solve it with MATLAB mldivide, \. The following code is an example:
Ap=rand(3);
A=rand(3);
estSigma=rand(3);
vecSigma=(kron(Ap.',A)-eye(size(Ap,1)*size(A,1)))\(-estSigma(:));
Sigma=reshape(vecSigma,size(estSigma,1),size(estSigma,2))
Simon Christensen
Simon Christensen 2024년 3월 7일
Thanks very much @Chuguang Pan :-). One small additional questions: In the attached image, it says '...is the usual estimator of the covariance matrix of..' (below the part attached with yellow)
Are you familiar with how 'estSigma' is supposed to be estimated?
Chuguang Pan
Chuguang Pan 2024년 3월 7일
I am not familiar with how the estimator of the covariance matrix is obtained. The variable estSigma is just named referred to the image @Simon Christensen.
Simon Christensen
Simon Christensen 2024년 3월 7일
Okay, thanks anyway :-)

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by