Learn R Programming

ivmte (version 1.0.0)

getXZ: Auxiliary function: extract X and Z covariates from a formula

Description

Auxiliary function that takes in a formula, and extracts the variable names of either the covariates or instruments.

Usage

getXZ(fm, inst = FALSE, terms = 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 fm should be returned instead of the variable names.