# Local Projections

In this recent NBER working paper, Òscar Jordà and Alan M. Taylor offer a survey of the best practice about recent developments on Local Projections (LP). The paper provides large coverage of different problems related to the application of the LP method in applied economics. The paper is accompanied by a GitHub repository where all the computations and figures in the WP are reproduced. That is perfect if you want to learn and practice, like me. I managed to reproduced all the examples on my own computer.

I was particularly interested in the inference part and, especially, in the lag-augmented LP part in the subsection 6.3. They indicate that lag-augmentation (see the lagged bold in the code snippet below) performs similarly to the Newey-West correction:

*** Generate the forward variables and reg
gen h=_n-1

forvalues i = 0/h'{
newey fi'.x y l.y l.x, lag(6)
replace b 	= _b[y] 	if h == i'
replace snw	= _se[y] 	if h == i'

reg fi'.x y l(1/2).y l(1/2).x, vce(hc3)
replace sla	= _se[y] 	if h == i'

}

*** Compare the error bands
gen unw		=	b + invnormal(1 -$p/2)*snw gen dnw = b - invnormal(1 -$p/2)*snw

gen ula		=	b + invnormal(1 -$p/2)*sla gen dla = b - invnormal(1 -$p/2)*sla

gen zero	= 0


## Reference

Òscar Jordà, and Alan M Taylor. “Local Projections.” National Bureau of Economic Research, August 12, 2024. https://www.nber.org/papers/w32822.

Gabriel Temesgen Woldu says:

Dear Jamal,
Thank you for sharing the code. I tried replicating the code with my data but couldn’t generate a result [invalid syntax].
Did you check whether the codes work with STATA 17? Plus, does the code entertain exogenous variables or order next to the response variable and shock variable?
Thanks