Announcement

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

  • How to Add 68% and 90% Confidence Intervals in lpirf IRF Graphs in Stata 18?

    Hello all,

    I'm working with the 'lpirf' command in Stata 18 to analyze impulse response functions and need help adding 68% and 90% confidence intervals to my IRF graphs, each with a different color. Currently,
    I'm using the default code provided by Stata 18:


    Code:
    use https://www.stata-press.com/data/r18/usmacro
    
    quietly lpirf inflation gap fedfunds, lags(1/12) step(24)
    
    irf set myirfs.irf, replace
    irf create model1
    irf graph oirf, yline(0)
    How can I modify it to include these two confidence intervals in the same graph? Any suggestions or code examples would be greatly appreciated!

  • #2
    You probably will need to plot each separately and extract the data, combine and then use twoway to get your desired graph. The -level()- option sets the confidence level.


    Code:
    irf graph oirf, level(90) yline(0)

    See #10 on how to extract the data: https://www.statalist.org/forums/for...s-in-one-graph

    Comment

    Working...
    X