Readme file for GLS_LPs_resids_cleaned_doublestack_HAC.m

Purpose:
Matlab code for Seemingly Unrelated Regression (SUR) approach, estimated via feasible GLS 
Enables re-aggregation of cross-sectional local projection estimates and their standard errors
Takes into account dependence between individual local projections estimates

Based on:
“The Long and Variable Lags of Monetary Policy: Evidence from Disaggregated Price Indices”
By Boragan Aruoba and Thomas Drechsel 
Journal of Monetary Economics, Vol. 148, November 2024

Instructions:

— The beginning of the code loads the left-hand-side and right-hand-side data for the local projections 
  This part of the code needs to to adjusted to your needs

— The way we load the data in the paper is that the left-hand-side data is already orthogonalized with respect to the controls (but has not been regressed on the shock yet)
  We then run our GLS code for the orthogonalized left-hand-side data and the shock + its lags as right-hand-side data; see footnote 12 of our paper for more details

— You do not have to do this orthogonalization and the code should run with any number of right-hands-side variables 
  However, regressing out the controls before loading the data into the code makes things faster, as the dimensions get smaller

— The code allows stacking the LP systems across variables, or across variables and horizons 
  Stacking across variables and horizons is computationally costly, so we only stacked across variables in our application
  Depending on your application stacking in both dimensions may or may not be feasible 

Note: we make the estimated monetary policy shocks used that are used in the local projects available separately
See https://econweb.umd.edu/~drechsel/research.html

For any questions, you can contact us at aruoba@umd.edu or drechsel@umd.edu