Function generating the S-weights for TSLS estimand, with controls.
tsls(X, Z, Z0, Z1, components, treat, order = NULL)
Matrix of covariates, including the treatment indicator.
Matrix of instruments.
Matrix of instruments, fixing treatment to 0.
Matrix of instruments, fixing treatment to 1.
Vector of variable names of which user wants the S-weights for.
Variable name for the treatment indicator.
integer, default set to NULL
. This is simply an
index of which IV-like specification the estimate corresponds
to.
A list of two vectors: one is the weight for D = 0, the other is the weight for D = 1.