Estimates a linear IV model via 2SLS (rmorie native k-class engine).
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. When given, standard errors are cluster-robust: the score is summed within each cluster before being squared, so within-cluster correlation is carried rather than assumed away. This selects the variance route;
robustchooses between HC1 and conventional errors when no cluster is named, anddetails$se_typerecords which of the three produced the result.- robust
Logical; if
TRUEuse HC1 robust standard errors.- alpha
Significance level for confidence intervals.
