Skip to contents

Routes to the native 2SLS engine (morie_iv_tsls), first-stage diagnostics (morie_iv_first_stage_diagnostics), Stock-Yogo critical values (morie_iv_stock_yogo), and the Anderson-Rubin confidence set (morie_iv_anderson_rubin_ci). Following Staiger-Stock, refuses to report the 2SLS point estimate when the first-stage F is below 10 and returns the identification-robust Anderson-Rubin set instead.

Usage

morie_iv_2sls(
  data,
  outcome,
  endogenous,
  instruments,
  exogenous = NULL,
  alpha = 0.05
)

Arguments

data

Data frame.

outcome

Outcome column.

endogenous

Endogenous regressor column (single).

instruments

Instrument column names.

exogenous

Optional exogenous covariate names.

alpha

CI tail. Default 0.05.

Value

Object of class "morie_iv": estimate (NA when the gate refuses), std.error, conf.int, first_stage_F, stock_yogo_10, weak_instruments, ar_confidence_set, method, n, call.

References

Staiger & Stock (1997); Anderson & Rubin (1949); Stock & Yogo (2005).

Examples

n <- 200
z <- rnorm(n); u <- rnorm(n)
d <- z + 0.5 * u + rnorm(n)
y <- 2 * d + u + rnorm(n)
morie_iv_2sls(data.frame(y, d, z), "y", "d", "z")
#> Two-stage least squares -- 2SLS (native k-class, HC1) with Staiger-Stock gate 
#>   Estimate: 1.7736  (SE 0.0951)  95% CI [1.5860, 1.9611]
#>   First-stage F = 196.08 (Stock-Yogo 10% crit = 16.38)