| baseline_equivalence | R Documentation |
Builds a report-ready baseline-equivalence table for a set of covariates, reporting group sample sizes, summaries, the appropriate standardized effect size, and the corresponding What Works Clearinghouse (WWC) equivalence category for each covariate. Continuous covariates use Hedges' g; binary covariates use the Cox index.
baseline_equivalence(data, treatment, covariates = NULL)
data |
A data frame. |
treatment |
String naming the column in |
covariates |
Character vector of column names to evaluate. Defaults to
all numeric, logical, and factor columns in |
A covariate with exactly two unique non-missing values is treated as binary; any other numeric covariate is treated as continuous. A non-numeric covariate with more than two categories is not supported and raises an error.
A data frame with one row per covariate and the columns:
covariate; type ("continuous" or "binary"); n_treatment,
n_comparison; mean_treatment, mean_comparison (group means for
continuous covariates, event proportions for binary ones); sd_treatment,
sd_comparison; effect_size (Hedges' g or Cox index, per type); and
wwc_category.
What Works Clearinghouse (2022). Procedures Handbook (Version 5.0). U.S. Department of Education.
df <- data.frame(
treat = c(1, 1, 1, 0, 0, 0),
pretest = c(5, 6, 7, 4, 5, 6),
female = c(1, 0, 1, 0, 0, 1)
)
baseline_equivalence(df, treatment = "treat")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.