Skip to contents

Estimates a linear IV model via 2SLS, preferring ivreg::ivreg.

Usage

morie_iv_tsls(
  data,
  outcome,
  endogenous,
  instruments,
  exogenous = NULL,
  cluster = NULL,
  robust = TRUE,
  alpha = 0.05
)

Arguments

data

Data frame.

outcome

Name of the outcome column.

endogenous

Character vector of endogenous regressor names.

instruments

Character vector of excluded-instrument names.

exogenous

Optional character vector of exogenous covariate names.

cluster

Optional name of a cluster ID column.

robust

Logical; if TRUE use HC1 robust standard errors.

alpha

Significance level for confidence intervals.

Value

A list with class morie_iv_result containing coefficients, standard errors, t-statistics, p-values, confidence interval bounds, variable names, sample size, method label, and a details list.