getXZ {ivmte} | R Documentation |
Auxiliary function: extract X and Z covariates from a formula
Description
Auxiliary function that takes in a two-sided formula, and extracts the variable names of either the covariates or instruments. The function returns an error if the formula includes a variable called 'intercept'.
Usage
getXZ(fm, inst = FALSE, terms = FALSE, components = FALSE)
Arguments
fm |
the formula. |
inst |
boolean expression, set to TRUE if the instrument names are to be extracted. Otherwise, the covariate names are extracted. |
terms |
boolean expression, set to TRUE if the terms in the
formula |
components |
boolean expression, set to FALSE by default. Indicates that the formula being considered is constructed from a list of components, and thus the term 'intercept' is permitted. |
Value
vector of variable names.
[Package ivmte version 1.4.0 Index]