Description Usage Arguments Value
View source: R/check_balance.R
Calculate standardized differences in means between treated and control groups,
before and after refining the control group. Used within the check_balance
function.
1 2 3 4 5 6 7 8 9 10 | get_stand_diffs(
data,
z,
selected,
st = NULL,
ist = NULL,
treated = 1,
control = 0,
denom_variance = "treated"
)
|
data |
A data frame with columns for which the standardized differences should be calculated. |
z |
a factor with the |
selected |
a boolean vector including whether each unit was selected as part of the treated and control
groups for analysis. Should be the same length as |
st |
a stratum vector with the |
ist |
The specific stratum for which the standardized differences should be calculated. |
treated |
which treatment value should be considered the treated units. This
must be one of the values of |
control |
which treatment value should be considered the control units. This
must be one of the values of |
denom_variance |
character stating what variance to use in the standardization:
either the default "treated", meaning the standardization will use the
treated variance (across all strata), where the treated group is declared in
the |
data frame containing two columns, one for standardized differences before choosing a subset of controls, and one for after. The rows pertain to covariates.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.