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, effective_F and mop_critical_10 (the heteroskedasticity-robust Montiel Olea-Pflueger effective F and its TSLS critical value at tau = 10 percent), weak_instruments, ar_confidence_set, method, n, call.

References

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

Examples

set.seed(1)
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: 2.0538  (SE 0.1122)  95% CI [1.8326, 2.2750]
#>   First-stage F = 142.23 (Stock-Yogo 10% crit = 16.38)
#>   Effective F (robust) = 116.51 (Montiel Olea-Pflueger TSLS tau=10% crit = 23.11)