Numerical data underlying the figures of PLOS ONE paper: "When drug treatments bias genetic studies: mediation and interaction". The files "Data_Figure3-4" pertain to simulation results described in the paper and appendix. The file "Data_Figure5" contains aggregated level data on the proportion and type of diabetes medication prescribed over a 3 year period. Data were obtained from a Dutch diabetes cohort 'GAINTT': https://www.giantt.nl/nl/The file "Data_Figure6" contains mean difference and p-values of 100+ genetic variants and their association with longitudinal (over a 3 year period) HbA1c levels. Results are stratified for treatment modelling strategy. These data have been shared inline with the journal's open access policy.