Heterogeneity in Media Effects

2026

By Saurabh Khanna and Jochen Peter

This project develops the open-source R package heterogeneity, which provides social science researchers with a robust and accessible implementation of causal forests to detect, estimate, and explain heterogeneous effects in communication research. Traditional approaches to assessing heterogeneity require pre-specified moderators and assume linear patterns. Causal forests overcome these limitations by identifying effect moderators directly from data, estimating individual-level effects with valid confidence intervals, as well as capturing nonlinear interactions. We validate the package across seminal social science datasets, demonstrating alignment with traditional methods, and documenting additional insights that conventional approaches might miss.