Drawing Local Projection IRFs with Driscoll-Kraay Inference in Stata (Update)

In a previous blog, I showed how to draw local projection’s impulse response function with Driscoll-Kraay inference in Stata. This is the picture what you get:

Notes: The figure reports impulse response functions of provincial GDP growth to a one-standard-deviation innovation in the US–China political relations index, estimated using local projections. Each horizon is estimated separately with province fixed effects and Driscoll–Kraay standard errors to account for serial correlation and cross-sectional dependence induced by common geopolitical shocks. Shaded areas denote 68%, 90%, and 95% confidence intervals based on horizon-specific Student-t critical values. The shock is standardized to have unit variance over the sample. The estimated response should be interpreted as an average dynamic effect under conservative inference.

But, Alfonso Ugarte on LinkedIn told me that you can also use locproj to get a similar picture (while not documented in the locproj help):

Full code below:

locproj D.GDP, shock(z_D_LUSA) ///
    h(2) yl(2) sl(0) zero ///
    c(L(1/2).(CPI TRADE GFCF POP TOT)) fe ///
    conf(90 95) lcolor(sand) ///
    ttitle("Horizon") title(`"US-China"') ///
    noisily stats save irfname(iUS) grname(US) met(xtscc)
	
lpgraph iUS, h(2) tti(Months) ///
 separate nolegend ///
 tti(Months) ti1(DK-LP) ///
 title("") ///
 lcolor(red) z grname(DK) grsave(DK) as(png) ///
 xtitle("Horizon") ///
 ytitle("Response of GDP growth (China Provinces)")

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.