Skip to contents

Grid-based Anderson-Rubin confidence interval for a single endogenous variable.

Usage

morie_iv_anderson_rubin_ci(
  data,
  outcome,
  endogenous,
  instruments,
  exogenous = NULL,
  grid_min = -10,
  grid_max = 10,
  grid_n = 200,
  alpha = 0.05
)

Arguments

data

A data.frame (or tibble) holding the outcome, endogenous regressors, instruments, and any exogenous controls.

outcome

Character; column name of the response variable.

endogenous

Character vector; column names of the endogenous regressors.

instruments

Character vector; column names of the instrumental variables.

exogenous

Optional character vector of additional exogenous regressors included in both the structural equation and the first stage. NULL (default) for a just-identified design.

grid_min

Numeric; lower bound of the AR confidence-set grid search over candidate beta0 values.

grid_max

Numeric; upper bound of the AR confidence-set grid.

grid_n

Integer; number of grid points used in morie_iv_anderson_rubin_ci (default 100).

alpha

Significance level (default 0.05); controls the confidence-set / acceptance-region cut-off.

Value

A vector of the computed values.

Examples

set.seed(1); n <- 400
z <- rbinom(n, 1, 0.5); u <- rnorm(n)
d <- rbinom(n, 1, plogis(0.8 * z + 0.3 * u))
y <- 0.5 * d + 0.4 * u + rnorm(n, sd = 0.5)
df <- data.frame(y, d, z)
morie_iv_anderson_rubin_ci(df, "y", "d", "z", grid_min = -2, grid_max = 2, grid_n = 50)
#> [1] -0.122449  1.183673