how to display the residual covariance matrix for VAR
-
chenlili8315
- Posts: 9
- Joined: Fri Jan 29, 2010 11:59 am
how to display the residual covariance matrix for VAR
Hi, all:
what is the code for displaying residual matrix for VAR?
I try to display the residual matrix for VAR, please see the following VAR code.
Thanks!
calendar 1959 1 4
allocate 2009:3
open data c:\users\lili\desktop\winrats\datas.xls
data(for=xls,org=col) / GDP Defl CPI FF TRE NB
SYSTEM(MODEL=CHAP2)
var GDP Defl CPI TRE NB FF
lags 1 to 13
end(system)
estimate(outsigma=v)
what is the code for displaying residual matrix for VAR?
I try to display the residual matrix for VAR, please see the following VAR code.
Thanks!
calendar 1959 1 4
allocate 2009:3
open data c:\users\lili\desktop\winrats\datas.xls
data(for=xls,org=col) / GDP Defl CPI FF TRE NB
SYSTEM(MODEL=CHAP2)
var GDP Defl CPI TRE NB FF
lags 1 to 13
end(system)
estimate(outsigma=v)
Re: how to display the residual covariance matrix for VAR
Use the SIGMA option on ESTIMATE, that is,chenlili8315 wrote:Hi, all:
what is the code for displaying residual matrix for VAR?
I try to display the residual matrix for VAR, please see the following VAR code.
Thanks!
Code: Select all
calendar 1959 1 4 allocate 2009:3 open data c:\users\lili\desktop\winrats\datas.xls data(for=xls,org=col) / GDP Defl CPI FF TRE NB SYSTEM(MODEL=CHAP2) var GDP Defl CPI TRE NB FF lags 1 to 13 end(system) estimate(outsigma=v)
Code: Select all
estimate(sigma,outsigma=v)-
chenlili8315
- Posts: 9
- Joined: Fri Jan 29, 2010 11:59 am
Re: how to display the residual covariance matrix for VAR
Thanks, Tom.
I got the covariance matrix of residuals, but it is not symmetric. Do u know why?
Covariance\Correlation Matrix of Residuals
GDP DEFL CPI TRE NB FF
GDP 1178.69528926 -0.0777229638 -0.1259528757 0.0397703830 0.0529053912 0.0738442477
DEFL -0.24577718 0.00848365 0.1901143829 -0.0398532395 0.3115684072 0.1496265473
CPI -1.74935586 0.00708395 0.16365851 -0.2307511587 -0.1202942661 0.2019298867
TRE 4.42937664 -0.01190795 -0.30282746 10.52359500 -0.1282880502 0.0014161112
NB 9.42408639 0.14889612 -0.25249500 -2.15926936 26.92012726 -0.1694065352
FF 2.01330067 0.01094438 0.06487257 0.00364813 -0.69800721 0.63064127
I got the covariance matrix of residuals, but it is not symmetric. Do u know why?
Covariance\Correlation Matrix of Residuals
GDP DEFL CPI TRE NB FF
GDP 1178.69528926 -0.0777229638 -0.1259528757 0.0397703830 0.0529053912 0.0738442477
DEFL -0.24577718 0.00848365 0.1901143829 -0.0398532395 0.3115684072 0.1496265473
CPI -1.74935586 0.00708395 0.16365851 -0.2307511587 -0.1202942661 0.2019298867
TRE 4.42937664 -0.01190795 -0.30282746 10.52359500 -0.1282880502 0.0014161112
NB 9.42408639 0.14889612 -0.25249500 -2.15926936 26.92012726 -0.1694065352
FF 2.01330067 0.01094438 0.06487257 0.00364813 -0.69800721 0.63064127
Re: how to display the residual covariance matrix for VAR
It's a matrix with both covariances and correlations. From the User's Guide:
Note, by the way, that that format is used only for the output. The covariance matrix that you save (or the %SIGMA matrix) is just the symmetric covariance matrix. If you want to convert that to correlations you can use %CVTOCORR(covariance matrix).Note that we use a backwards slash (\) between the words “Covariance” and “Correlation” in the header because it looks like the diagonal of a matrix. The word “Covariance” lies to the left of the slash, reminding you that the covariance results appear on and to the left of the diagonal of the output matrix. Likewise, “Correlation” lies to the right of the slash, just as the correlation results appear to the right of the diagonal in
the output.