external validity

generalize: an R package for estimating population effects from randomized trial data

The generalize R package is designed for researchers to implement post-hoc statistical methods for assessing and improving upon the generalizability of RCT findings to a well-defined target population. See the Github repo’s webpage for more details on installation and usage.

Generalizing RCT findings to a Target Population

Randomized controlled trials (RCTs) are considered the gold standard for estimating the causal effect of a drug or intervention in a study sample. However, while RCTs have strong internal validity, they often have weaker external validity, making it difficult to generalize trial results from a “non-representative” study sample to a broader population. This makes it challenging for policymakers to accurately draw population-level conclusions from trial evidence. Given increasing concern about potential lack of generalizability of RCT findings, statistical methods have recently been proposed to estimate population average treatment effects by supplementing trial data with target population-level data.