powered by
This function generates the design matrix given an IV specification.
design(formula, data, subset)
Formula with which to generate the design matrix.
data.frame with which to generate the design matrix.
data.frame
Condition to select subset of data.
Three matrices are returned: one for the outcome variable, Y; one for the second stage covariates, X; and one for the first stage covariates, Z.
# NOT RUN { design(formula = ey ~ d | z, data = dtm, subset = z %in% c(1, 2)) # }
Run the code above in your browser using DataLab