LOCAL_PROJECTION

Trace the estimated response of an outcome to one unit of a supplied shock. Each point on the curve comes from a separate regression.

Syntax

LOCAL_PROJECTION(LIST(outcome,shock[,controls...])[,horizon[,lags]])
localProjection(LIST(outcome,shock),24,2)

The maximum horizon defaults to 12 (range 1–120). Lag order defaults to 1 (range 0–60). The inputs are aligned using getSameDateRange. Use regularly spaced series at the intended frequency. Horizons count aligned rows, so a gap in the calendar can change their meaning.

What is fitted?

At horizon h, regress Y(t+h) on an intercept, the shock at t, and lags 1 through p of every series in the list. Extra controls enter through their lags. At p = 0 the list takes only Y and the shock. Horizon zero measures the contemporaneous response. Each later horizon loses one observation at the end. Constant or redundant regressors and insufficient residual degrees of freedom produce an error.

How to read the graph

The line is the shock coefficient in original outcome units per unit of shock. Shading is a pointwise 95% confidence interval (estimate ± 1.96 HAC standard errors). Bartlett weights use bandwidth h with an n/(n−k) correction, where k counts all fitted coefficients. At horizon zero this gives a heteroskedasticity-robust standard error. The interval describes uncertainty in the estimated response. A prediction interval for a future observation would include additional uncertainty.

Example

housing=LOGDIFF(HOUSTNSA)
permits=LOGDIFF(PERMITNSA)
lp=LOCAL_PROJECTION(LIST(housing,permits),24,2)
EXTRACT(lp,"impulse")

Here permit growth is an observed predictor. A causal interpretation requires an identified shock. For comparison with VAR or VECM, supply the same historical innovation, sign and units, and match the outcome transformation and conditioning set. A one-standard-deviation innovation requires a correspondingly scaled input. These bands condition on the supplied series and omit uncertainty from estimating a shock in a first stage.

Extracts

impulse returns the default chart. model gives the horizon, sample size, coefficient, standard error and interval. response, se, lower and upper are numeric arrays starting at horizon zero. slideshow contains the chart and table.

Method reference: Òscar Jordà (2005), Estimation and Inference of Impulse Responses by Local Projections.

Available extracts

Save the command result in a variable, then use EXTRACT(result, "key"). Availability can depend on the input form and fitted model.

In indexed patterns such as beta:n, replace n with the required index.