WWC clustering correction for mismatched analyses
Source:R/cluster_correction.R
cluster_correction.RdCorrects the statistical significance of a finding for clustering, following the What Works Clearinghouse (WWC) procedure based on Hedges (2007). The correction applies when assignment was at the cluster level (classrooms or schools) but the analysis was at the student level, a "mismatch" that leaves the reported standard errors too small. It computes the t statistic implied by the effect size, then corrects both the t statistic and its degrees of freedom for clustering, and returns the clustering-corrected two-tailed p value and significance decision.
Usage
cluster_correction(
g,
n_treatment,
n_comparison,
m_treatment,
m_comparison,
icc = NULL,
outcome = c("achievement", "other")
)Arguments
- g
Effect size (Hedges' g) ignoring clustering.
- n_treatment, n_comparison
Student-level sample sizes.
- m_treatment, m_comparison
Number of clusters in each group.
- icc
Intraclass correlation. If
NULL(default), the WWC default is used: 0.20 foroutcome = "achievement", 0.10 otherwise.- outcome
"achievement"or"other", selecting the default ICC wheniccisNULL.
Value
A data frame, one row per input, with columns t (ignoring
clustering), t_corrected, df (corrected degrees of freedom), p_value
(clustering-corrected, two-tailed), and significant (p_value < 0.05).
Details
Because the correction can only reduce significance, the WWC applies it only to findings the study authors reported as statistically significant; a finding that was not significant stays not significant. This function computes the corrected values regardless; apply them where the WWC rules call for it.