Errors SD in a BVAR model
-
AhmedSahlool
- Posts: 78
- Joined: Tue Jul 05, 2011 5:57 am
Errors SD in a BVAR model
Hi Tom,
I hope this finds you well,
In order to interpret the IRF results that I obtain with a BVAR model estimated with Gibbs sampling, I would like to know how to get the Standard deviation of different shocks?
To explain better, The impulse responses that I obtain with the @MCGraphIRF procedure are linear in the sizes of the shocks; the one SD shocks are used to put the whole set of responses into a proper context.
In order to understand better the results, we need to know what "one SD" measures for each variable. For instance: The magnitude of standard deviation shocks is 0.28 percentage point for world growth, 27 basis points for U.S. T-bill rates, etc.
In the case of a BVAR estimated with Gibbs sampling, should I sum the errors variance covariance matrix in each draw and average it, as we do with other results?
Thank you for your time,
Ahmed
I hope this finds you well,
In order to interpret the IRF results that I obtain with a BVAR model estimated with Gibbs sampling, I would like to know how to get the Standard deviation of different shocks?
To explain better, The impulse responses that I obtain with the @MCGraphIRF procedure are linear in the sizes of the shocks; the one SD shocks are used to put the whole set of responses into a proper context.
In order to understand better the results, we need to know what "one SD" measures for each variable. For instance: The magnitude of standard deviation shocks is 0.28 percentage point for world growth, 27 basis points for U.S. T-bill rates, etc.
In the case of a BVAR estimated with Gibbs sampling, should I sum the errors variance covariance matrix in each draw and average it, as we do with other results?
Thank you for your time,
Ahmed
Re: Errors SD in a BVAR model
The range of the impact responses usually gives you the information that you need. But if you want to, then yes, you can get them by averaging across draws.
-
AhmedSahlool
- Posts: 78
- Joined: Tue Jul 05, 2011 5:57 am
Re: Errors SD in a BVAR model
Would you kindly elaborate more, as I'm trying to average and it is taking a lot of time and effort.
I started by declaring the matrix "Struc_sigmad", to store the structural residuals, and this outside the loop,
DEC Rec[real] Struc_sigmad(nvar,nvar)
Then I fill it with zeros to sum inside the loop,
compute Struc_sigmad=%zeros(nvar,nvar)
Inside the loop, I transform the reduced form errors' variance covariance matrix to structural one by:
compute Struc_sigmaddraw=(INV(%decomp(sigmad)))*sigmad*TR(INV(%decomp(sigmad)))
Then I sum the output "Struc_sigmaddraw" inside the matrix "Struc_sigmad"
compute Struc_sigmad(i,j) = Struc_sigmad(i,j) + Struc_sigmaddraw(i,j)
I got the message ## MAT13. Store into Out-of-Range Matrix or Series Element
Would you kindly give me some help
I started by declaring the matrix "Struc_sigmad", to store the structural residuals, and this outside the loop,
DEC Rec[real] Struc_sigmad(nvar,nvar)
Then I fill it with zeros to sum inside the loop,
compute Struc_sigmad=%zeros(nvar,nvar)
Inside the loop, I transform the reduced form errors' variance covariance matrix to structural one by:
compute Struc_sigmaddraw=(INV(%decomp(sigmad)))*sigmad*TR(INV(%decomp(sigmad)))
Then I sum the output "Struc_sigmaddraw" inside the matrix "Struc_sigmad"
compute Struc_sigmad(i,j) = Struc_sigmad(i,j) + Struc_sigmaddraw(i,j)
I got the message ## MAT13. Store into Out-of-Range Matrix or Series Element
Would you kindly give me some help
-
AhmedSahlool
- Posts: 78
- Joined: Tue Jul 05, 2011 5:57 am
Re: Errors SD in a BVAR model
Sorry for bothering,
I think that I succeeded to average following the same way as to get the record for model coefficients:
I started by declaring the matrix "Struc_sigmad", to store the structural residuals, and this outside the loop,
DEC Series[Rect] Struc_sigmad
Then I fill it with zeros,
gset Struc_sigmad 1 ndraws = %zeros(nvar,nvar)
Inside the loop, I transform the reduced form errors' variance covariance matrix to structural one by "I don't know if this transformation is correct":
compute Struc_sigmaddraw=(INV(%decomp(sigmad)))*sigmad*TR(INV(%decomp(sigmad)))
I keep the whole record of matrices
compute Struc_sigmad(draw)=Struc_sigmaddraw
Then outside the loop i average by:
dec rect StrucMatrix(nvar,nvar)
do i=1,nvar
do j=1,nvar
sstats(mean) 1 ndraws Struc_sigmad(t)(i,j)>>StrucMatrix(i,j)
end do j
end do i
The final output is a diagonal matrix with ones on the diagonal, I was expecting to have the variance of each structural shock on the diagonal; some thing different from one!! Is it the transformation equation above?
What do you think, could you kindly give me some guidance.
I think that I succeeded to average following the same way as to get the record for model coefficients:
I started by declaring the matrix "Struc_sigmad", to store the structural residuals, and this outside the loop,
DEC Series[Rect] Struc_sigmad
Then I fill it with zeros,
gset Struc_sigmad 1 ndraws = %zeros(nvar,nvar)
Inside the loop, I transform the reduced form errors' variance covariance matrix to structural one by "I don't know if this transformation is correct":
compute Struc_sigmaddraw=(INV(%decomp(sigmad)))*sigmad*TR(INV(%decomp(sigmad)))
I keep the whole record of matrices
compute Struc_sigmad(draw)=Struc_sigmaddraw
Then outside the loop i average by:
dec rect StrucMatrix(nvar,nvar)
do i=1,nvar
do j=1,nvar
sstats(mean) 1 ndraws Struc_sigmad(t)(i,j)>>StrucMatrix(i,j)
end do j
end do i
The final output is a diagonal matrix with ones on the diagonal, I was expecting to have the variance of each structural shock on the diagonal; some thing different from one!! Is it the transformation equation above?
What do you think, could you kindly give me some guidance.
Re: Errors SD in a BVAR model
This
compute Struc_sigmaddraw=(INV(%decomp(sigmad)))*sigmad*TR(INV(%decomp(sigmad)))
creates the identify matrix by construction.
The information that you want (so far as I can tell) is already incorporated into the graphs in the "own" impact responses. If you want to compute this, what you want is just
compute Struc_sigmaddraw=%decomp(sigmad)
The diagonals of that will be the loadings onto the own Cholesky-factored shocks.
compute Struc_sigmaddraw=(INV(%decomp(sigmad)))*sigmad*TR(INV(%decomp(sigmad)))
creates the identify matrix by construction.
The information that you want (so far as I can tell) is already incorporated into the graphs in the "own" impact responses. If you want to compute this, what you want is just
compute Struc_sigmaddraw=%decomp(sigmad)
The diagonals of that will be the loadings onto the own Cholesky-factored shocks.