demand and supply shocks
demand and supply shocks
hey,
I got confused how to graph demand and supply shocks and how to get the exact single value of demand and supply shocks under the Blanchard-Quah decomposition. Earliest reply will be appreciated.
I got confused how to graph demand and supply shocks and how to get the exact single value of demand and supply shocks under the Blanchard-Quah decomposition. Earliest reply will be appreciated.
Demand and supply shocks
You need the structural residuals. These can be computed using the @StructResids procedure:
With the BQ factor, the supply shocks are in the first component (sresids(1)) and the demand shocks in sresids(2).
Check the Blanchard-Quah AER 1989 topic. That was added since this was originally written
Code: Select all
estimate(resids=resids)
*
* Compute the Blanchard-Quah factorization of the covariance matrix
*
compute bqfactor=%bqfactor(%sigma,%varlagsums)
@structresids(factor=bqfactor) resids %regstart() %regend() sresidsCheck the Blanchard-Quah AER 1989 topic. That was added since this was originally written
Re: demand and supoply shocks
hey,
thanks for the reply with commendable help. I did what u said, but i got such results, which i have hereby posted. I may be stupid, but i am still unable to figure out demand and supply shocks from this result. Could you also let me know codes for making graphs in rats for demand and supply shocks as well?
I am very new for RATs. So, your suggestions will be highly appreciative. Once again, thanks for the reply. Looking forward to see reply for this very soon.
compute bqfactor=%bqfactor(%sigma,%varlagsums)
procedure StructResids
(01.0005)
(01.0005) source structresids(factor=bqfactor) resids %regstart() %regend() sresids
(01.0022)
(01.0022)
(01.0022)
(01.0022)
(01.0025)
thanks for the reply with commendable help. I did what u said, but i got such results, which i have hereby posted. I may be stupid, but i am still unable to figure out demand and supply shocks from this result. Could you also let me know codes for making graphs in rats for demand and supply shocks as well?
I am very new for RATs. So, your suggestions will be highly appreciative. Once again, thanks for the reply. Looking forward to see reply for this very soon.
compute bqfactor=%bqfactor(%sigma,%varlagsums)
procedure StructResids
(01.0005)
(01.0005) source structresids(factor=bqfactor) resids %regstart() %regend() sresids
(01.0022)
(01.0022)
(01.0022)
(01.0022)
(01.0025)
Re: demand and supoply shocks
StructResids already exists. Don't try to write a new one. Just use the @StructResids... as I wrote it above.
If you want to graph the supply shock (after doing the @StructResids line), use something like:
The demand shock is
If you want to graph the supply shock (after doing the @StructResids line), use something like:
Code: Select all
graph(footer="Supply Shock")
# sresids(1)Code: Select all
graph(footer="Demand Shock")
# sresids(2)Re: demand and supoply shocks
hey,
Thank you very much for reply. But it does not work to me. I am confused. I coded in the following way.
Could you let me know where it went wrong. I am using Rats 6.2 version. I have been struggling and struggling to solve it. Please help me once again.
However, the rats asked to open StructResids and could not find the file name. then, it gives such a message"
"## CP18. STRUCTRESIDS is not the Name of a PROCEDURE. (Did you forget to SOURCE?)"
Once again, awaiting your reply.
I really appreciate your help
Thank you very much for reply. But it does not work to me. I am confused. I coded in the following way.
Could you let me know where it went wrong. I am using Rats 6.2 version. I have been struggling and struggling to solve it. Please help me once again.
Code: Select all
cal 1970
allocate 2007:1
open data in.txt
data(format=free,org=obs) / yyy ingdp incpi usgdp
seed 123456
smpl 1970:1 2007:1
set lningdp = log(ingdp)
set lincpi = log(incpi)
set lusgdp = log(usgdp)
smpl 1970:1 2007:1
set dingdp = lningdp -lningdp(t-1)
set dincpi =lincpi-lincpi(t-1)
set dusgdp =lusgdp-lusgdp(t-1)
system(model=mywork)
variables dingdp dincpi
lags 2
det constant dusgdp{0 to 1}
end(system)
estimate(resids=resids)
*
* Compute the Blanchard-Quah factorization of the covariance matrix
*
compute bqfactor=%bqfactor(%sigma,%varlagsums)
@StructResids(factor=bqfactor) resids %regstart() %regend() sresids
graph(footer="Supply Shock")
# sresids(1)
graph(footer="Demand Shock")
# sresids(2)
end(system)
"## CP18. STRUCTRESIDS is not the Name of a PROCEDURE. (Did you forget to SOURCE?)"
Once again, awaiting your reply.
I really appreciate your help
Re: demand and supoply shocks
I think you want that to besachin wrote:Code: Select all
system(model=mywork) variables dingdp dincpi lags 2 det constant dusgdp{0 to 1} end(system)
Code: Select all
lags 1 2