rollmatch (version 1.0.0)

addBalanceTable: Add the balancing table to the final output As it's an internal helper function to aid in testing, it is not exported for use outside of the package.

Description

Add the balancing table to the final output As it's an internal helper function to aid in testing, it is not exported for use outside of the package.

Usage

addBalanceTable(reduced_data, vars, tm, id, combined_output, treat, matches)

Arguments

reduced_data

Dataframe of reduced treatment and comparison data

vars

A vector of dataframe column names

tm

The time period indicator

id

ID variable in dataset

combined_output

A list of output for the rollmatch package. See makeOutput

treat

The Treatment variable

matches

Dataframe containing the matches from comparison_pool

Value

output returns a list containing the following additional component to the list out:

balance

The balancing table.

Examples

Run this code
# NOT RUN {
fm <- as.formula(treat ~ qtr_pmt + yr_pmt + age + is_male + is_white +
                 is_disabled + is_esrd + months_dual + chron_num+lq_ed+
                 yr_ed2 + lq_ip + yr_ip2)
vars <- all.vars(formula); treat <- vars[1]
tm <- "quarter"; id <- "indiv_id"
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace