Two-step efficient GMM via gmm::gmm; falls back to 2SLS otherwise.
Usage
morie_iv_gmm(
data,
outcome,
endogenous,
instruments,
exogenous = NULL,
weight_matrix = "optimal",
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.
- weight_matrix
One of
"optimal"(default, two-step) or"identity"(one-step / 2SLS-equivalent).- robust
Logical; if
TRUEuse HC1 robust standard errors.- alpha
Significance level for confidence intervals.