Description Usage Arguments Value Examples
An extension of the match.data
function from the MatchIt
library.
Equivalent to performing match.data(m.out)
with the addition of providing
the matched group data, which is provided in the STRATA
variable.
1 | match_data_groups(m.out, df, join_index)
|
m.out |
The m.out object from calling 'matchit' (e.g. matchit(formula, data=prematch_df)). |
df |
The data.frame object that was called by 'matchit' to create 'm.out'. |
join_index |
The unique identifier used to left join items from the prematch data.frame to the postmatch data.frame. |
Returns a data.frame that has the matched data (created by 'match.data(m.out)' with a new column called STRATA which has the matching group information.
1 2 3 4 5 | library(MatchIt)
# m.out was already created by calling 'matchit'
matched_data <- match_data_groups(m.out, prematch_data, join_index="ID")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.