Page 1 of 1
demand and supply shocks
Posted: Fri May 08, 2009 8:19 pm
by sachin
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.
Demand and supply shocks
Posted: Sat May 09, 2009 11:05 am
by TomDoan
You need the structural residuals. These can be computed using the
@StructResids procedure:
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() sresids
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
Re: demand and supoply shocks
Posted: Sat May 09, 2009 1:33 pm
by sachin
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)
Re: demand and supoply shocks
Posted: Sat May 09, 2009 2:09 pm
by TomDoan
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:
Code: Select all
graph(footer="Supply Shock")
# sresids(1)
The demand shock is
Code: Select all
graph(footer="Demand Shock")
# sresids(2)
Re: demand and supoply shocks
Posted: Sat May 09, 2009 3:44 pm
by sachin
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.
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)
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
Re: demand and supoply shocks
Posted: Mon May 18, 2009 5:15 pm
by TomDoan
sachin wrote:
Code: Select all
system(model=mywork)
variables dingdp dincpi
lags 2
det constant dusgdp{0 to 1}
end(system)
I think you want that to be