MatchItEXT (version 0.0.1)

parse_formula: Parse formula to obtain grouping variable and covariate vector

Description

This function parses the formula used in matchit() to obtain the grouping variable and the covariate vector.

Usage

parse_formula(mi_obj = NULL)

Arguments

mi_obj

A matchit object derived from MatchIt pacakge

Value

Return a list including the grouping variable and covariate vector

Examples

Run this code
# NOT RUN {
m_out <- MatchIt::matchit(treat ~ re74 + re75 + age + educ + hispan +
black, data = MatchIt::lalonde, method = "nearest")
parse_formula(m_out)
# }

Run the code above in your browser using DataLab