Related Experiment Video
Updated: Jul 15, 2025

Inverse Probability of Treatment Weighting Propensity Score using the Military Health System Data Repository and National Death Index
Published on: January 8, 2020
A Tutorial for Propensity Score Weighting for Moderation Analysis With Categorical Variables: An Application
Beth Ann Griffin1, Megan S Schuler1, Matt Cefalu2
1RAND Corporation, Arlington, VA.
Objective:
To provide step-by-step guidance and STATA and R code for using propensity score (PS) weighting to estimate moderation effects with categorical variables.
Research Design:
Tutorial illustrating the key steps for estimating and testing moderation using observational data. Steps include: (1) examining covariate overlap across treatment groups within levels of the moderator; (2) estimating the PS weights; (3) evaluating whether PS weights improved covariate balance; (4) estimating moderated treatment effects; and (5) assessing the sensitivity of findings to unobserved confounding. Our illustrative case study uses data from 41,832 adults from the 2019 National Survey on Drug Use and Health to examine if gender moderates the association between sexual minority status (eg, lesbian, gay, or bisexual [LGB] identity) and adult smoking prevalence.
Results:
For our case study, there were no noted concerns about covariate overlap, and we were able to successfully estimate the PS weights within each level of the moderator. Moreover, balance criteria indicated that PS weights successfully achieved covariate balance for both moderator groups. PS-weighted results indicated there was significant evidence of moderation for the case study, and sensitivity analyses demonstrated that results were highly robust for one level of the moderator but not the other.
Conclusions:
When conducting moderation analyses, covariate imbalances across levels of the moderator can cause biased estimates. As demonstrated in this tutorial, PS weighting within each level of the moderator can improve the estimated moderation effects by minimizing bias from imbalance within the moderator subgroups.
More Related Videos
Related Concept Videos
Statistical Methods for Analyzing Epidemiological Data
Bias in Epidemiological Studies
Strategies for Assessing and Addressing Confounding
Confounding can be addressed at both the design phase of a study and through analytical methods after data...
Study Design in Statistics
Does aspirin reduce the risk of heart attacks? Is one brand of fertilizer more effective at growing roses than another? Is fatigue as dangerous to a driver as the influence of alcohol? Questions like these are answered using randomized experiments with proper...
Friedman Two-way Analysis of Variance by Ranks
Odds Ratio

