Randomized controlled trials (RCTs) evaluate hypotheses in specific contexts and are often considered the gold standard of evidence for infectious disease interventions, but their results cannot immediately generalize to other contexts (e.g., different populations, interventions, or disease burdens). Mechanistic models are one approach to generalizing findings between contexts, but infectious disease transmission models (IDTMs) are not immediately suited for analyzing RCTs, since they often rely on time-series surveillance data. We developed an IDTM framework to explain relative risk outcomes of an infectious disease RCT and applied it to a water, sanitation, and hygiene (WASH) RCT. This model can generalize the RCT results to other contexts and conditions. We developed this compartmental IDTM framework to account for key WASH RCT factors: i) transmission across multiple environmental pathways, ii) multiple interventions applied individually and in combination, iii) adherence to interventions or preexisting conditions, and iv) the impact of individuals not enrolled in the study. We employed a hybrid sampling and estimation framework to obtain posterior estimates of mechanistic parameter sets consistent with empirical outcomes. We illustrated our model using WASH Benefits Bangladesh RCT data (n = 17,187). Our model reproduced reported diarrheal prevalence in this RCT. The baseline estimate of the basic reproduction number [Formula: see text] for the control arm (1.10, 95% CrI: 1.07, 1.16) corresponded to an endemic prevalence of 9.5% (95% CrI: 7.4, 13.7%) in the absence of interventions or preexisting WASH conditions. No single pathway was likely able to sustain transmission: pathway-specific [Formula: see text] for water, fomites, and all other pathways were 0.42 (95% CrI: 0.03, 0.97), 0.20 (95% CrI: 0.02, 0.59), and 0.48 (95% CrI: 0.02, 0.94), respectively. An IDTM approach to evaluating RCTs can complement RCT analysis by providing a rigorous framework for generating data-driven hypotheses that explain trial findings, particularly unexpected null results, opening up existing data to deeper epidemiological understanding.