Announcement

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

  • showing different confidence levels for IRF & positive versus negative shocks (VAR analysis)

    Hi all
    I have two basic questions for a VAR analysis:
    1- I am estimating a var and plotting the orthognalized IRFs. The default in Stata for confidence level is 95%.
    Is there a way to show different confidence levels for the same graph, for example showing lines for 95% and 99% levels for the impulses instead of only 95% or 99%?

    I used this anyways to plot my irfs:
    Code:
    var gdp inv oil klm, lags(1) dfk
    irf create order1, step(10) set(myirf1, replace)
    irf cgraph (order1 klm gdp oirf)
    2- I understand that the IRF reported from the code above will show the impact of a positive shock. Can I show the impact of negative shocks as well (as I am expecting asymmetry in the response to the shocks)?

  • #2
    1. You can recreate the IRF graphs with different confidence intervals by opening up the *irf file and creating the graph by hand, see below. 2. Unless the VAR is non-linear in some sense, wouldn't the effect by symmetric?

    Code:
    clear*
    webuse lutkepohl2
    var dln_inv dln_inc
    irf create irf1, set(irf1, replace)
    irf graph oirf, impulse(dln_inv) response(dln_inc) name(orig1,replace)
    use "irf1.irf",clear
    keep if impulse == "dln_inv" & response == "dln_inc"
    keep step oirf stdoirf
    
    gen upper_ci1= oirf +1.96*stdoirf
    gen lower_ci1 = oirf - 1.96*stdoirf
    gen upper_ci2= oirf +2.576*stdoirf
    gen lower_ci2 = oirf - 2.576*stdoirf
    twoway line oirf step , lc(black)  ///
        || rarea upper_ci1 lower_ci1 step, color(blue%40) lcolor(white)  ///
        || rarea upper_ci2 lower_ci2 step, color(blue%20) lcolor(white) ///
        || , legend(pos(6) row(1))
    Click image for larger version

Name:	irf.png
Views:	1
Size:	93.5 KB
ID:	1499446

    Last edited by Scott Merryman; 21 May 2019, 18:25.

    Comment

    Working...
    X