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

Description Usage Arguments Value

View source: R/callcheck.R

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

1
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 fm should be returned instead of the variable names.

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.


ivmte documentation built on Sept. 17, 2021, 5:06 p.m.