Description Usage Arguments Value
View source: R/CalculateBalance_function.R
Function that calculates the standardized difference of means.
1 2 | CalculateBalance(dtaBef, dtaAfter = NULL, cols, trt,
diff_means = FALSE)
|
dtaBef |
Data frame including the data before matching. |
dtaAfter |
Data frame including only the matched pairs data. Can be set to NULL if we want to calculate the standardized difference of means for only one dataset. |
cols |
Column indeces of the variables we want to check. Should be the same in both dtaBef and dtaAfter |
trt |
Column index for treatment variable. |
diff_means |
Logical. Set equal to TRUE to return the difference in means of treated versus controls. Defaults to FALSE. |
A 2 by length(cols) matrix with the standardized difference of means before and after matching. (Second row is empty if dtaAfter is not given.)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.