| attrition | R Documentation |
Computes overall and differential sample attrition for a two-group design, the inputs to the What Works Clearinghouse (WWC) attrition standard. Differential attrition is the absolute difference between the treatment and comparison attrition rates.
attrition(treatment, retained, na.rm = TRUE)
treatment |
Vector identifying group membership; exactly two unique
non-missing values (the larger is treated as the treatment group, as in
|
retained |
Logical (or |
na.rm |
Logical; drop rows where |
This function reports the attrition rates; it does not classify them. Compare the overall and differential rates against the WWC attrition boundary for your chosen response assumption (cautious or optimistic) in the Procedures Handbook.
A one-row data frame with columns attrition_overall,
attrition_treatment, attrition_comparison, and
differential_attrition (all proportions).
What Works Clearinghouse (2022). Procedures Handbook (Version 5.0). U.S. Department of Education.
set.seed(1)
g <- rep(c(1, 0), each = 100)
kept <- rbinom(200, 1, ifelse(g == 1, 0.9, 0.8))
attrition(g, kept)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.