View source: R/propensityscore_multimatch.R
propensityscore_multimatch | R Documentation |
This function performs propensity score matching for multiple control groups
against a single treatment group using the MatchIt
package.
propensityscore_multimatch(df, treatmentID, controlID, treatmentvar, match_var)
df |
A data frame containing the necessary variables for propensity score matching. |
treatmentID |
A character indicating the ID for the treatment group. |
controlID |
A vector of characters indicating the IDs for the control groups. |
treatmentvar |
A character string specifying the column name in |
match_var |
A character vector specifying the column names in |
A data frame containing the matched data.
## Not run:
matched_data <- propensityscore_multimatch(
df = your_data_frame,
treatmentID = "treatID",
controlID = c("controlID1", "controlID2"),
treatmentvar = "treatment_column",
group_var = "group_column",
match_var = c("var1", "var2")
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.