Skip to contents

Runs the exposure-weighted IV at the shock level (see [ssb_aggregate()]), including the shock-level controls of the Borusyak-Hull-Jaravel equivalent regression: a constant, plus period fixed effects in panels. The point estimate equals the location-level shift-share estimate (exactly so on the shift route, where the corresponding location-level controls – the sum of exposure shares, interacted with period fixed effects in panels – are in place automatically); the heteroskedasticity- or cluster-robust standard error of this shock-level regression is the exposure-robust (AKM-type) SE.

Usage

ssb_shock_iv(design, cluster = NULL, level = 0.95)

Arguments

design

An [ssb_design()] object.

cluster

Optional grouping of the shocks for a cluster-robust shock-level SE: a column name in the shocks table, or a vector of length equal to the number of shock-cells.

level

Confidence level for the reported interval.

Value

A one-row `data.frame` (class `ssb_shock_iv`) with `estimate`, `std.error`, `conf.low`, `conf.high`.

Details

The scores use the shocks *residualised* on the shock-level controls with exposure weights, \(\tilde g_n\), not the raw \(g_n\): the two give the same coefficient but different standard errors, and only the residualised version is valid (Borusyak, Hull & Jaravel). The calculation reproduces the `ssaggregate` workflow – aggregate the residualised location variables, then run the shock-level IV with a constant (and period fixed effects) and robust standard errors. The reported SE is HC1 (the small-sample factor `reg`/`ivreg2, small` apply); without that factor it coincides with the Adao-Kolesar-Morales AKM SE of ShiftShareSE whenever the location controls lie in the span of the shares (e.g. an intercept with complete shares, or period fixed effects), and differs only by finite-sample terms in how the shocks are residualised otherwise.

Examples

sim <- ssb_simulate(n_loc = 80, n_sec = 10, seed = 1)
d <- ssb_design(sim$data, sim$shares, sim$shocks, exogenous = "shift")
ssb_shock_iv(d)
#> <ssBartik shock-level IV>
#>   estimate 1.4468   se 0.1170   [1.218, 1.676]