Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Controlling the graphs produced by the irf graph command

    Hi, all -

    I am running a structural vector autoregression in Stata 14 using quarterly data (< 200 observations).

    My current code:

    .
    .
    .
    .
    matrix input A1 = (1,0,0,0,0,0 \ .,1,0,0,0,0 \ .,.,1,0,0,0\.,.,.,1,0,0\.,.,.,.,1,0\.,.,.,.,.,1)
    quietly svar logrgdp logdeflator FF logM1 logNBR logTR, lags(1/4) aeq(A1)
    irf create order1, set(var1.irf) replace step(20)
    irf graph sirf, xlabel(0(1)20) irf(order1) yline(0,lcolor(red))



    My issue:

    This code works. It completes the solves the SVAR model etc. However, the irf graph command is producing 36 graphs. This process of producing 36 graphs is overwhelming my computer and causing Stata to become nonresponsive for periods of 20-30 minutes.

    And so I would like to know if there is a way I can have the irf graph command only produce graphs that show the response of my macro. variables to a monetary policy shock (FF is my policy variable).


    What I tried:
    .
    .
    .
    irf graph sirf, xlabel(0(1)20) irf(order1) yline(0,lcolor(red)),byopts(holes(7/36))

    where the change is the addition of the byopts(holes()) snippet. However, I am getting a syntax error message whenever I run this code. I think it might need to be something more like:
    .
    .
    .
    irf graph sirf, xlabel(0(1)20) irf(order1) yline(0,lcolor(red)),byopts(by(var,holes(7/36)))


    but I am not sure.






    Can anyone give me any advice here?



  • #2
    bump

    Comment


    • #3
      I found the answer for my question. I will post here in case anyone else has this same question in the future:

      following my structural VAR command, I can use the irf create command and then the irf graph command.
      Within the graph command, I can specify which variable to treat as the shock using impulse(varname) and which variables I want to treat as response variables using impulse(varname1...varnameN).

      This will limit the graphs produced to only those graphs where your response variables respond the the specified policy shock.


      Comment

      Working...
      X