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
TRUEuse HC1 robust standard errors.- alpha
Significance level for confidence intervals.