ABSTRACT
Purpose
Observational comparative studies can be analyzed using intention‐to‐treat (ITT) (i.e., initial‐treatment) or as‐treated (AT) (i.e., per‐protocol) approaches to estimate distinct treatment effects. Unfortunately, AT analyses have an increased vulnerability to selection bias from informative censoring. While methods for informative censoring adjustment are well established, the nuances of their implementation are less well documented.
Methods
We compared marginal hazard ratios for all‐cause mortality from ITT and AT analyses comparing new users of selective serotonin reuptake inhibitors (SSRIs) and serotonin‐norepinephrine reuptake inhibitors (SNRIs) in the clinical practice research datalink from 2019 to 2022 using inverse probability of treatment weights. We created inverse probability of censoring weights (IPCW) using (A) non‐lagged and (B) lagged models to adjust for informative censoring in the AT analyses. We replicated analyses comparing acetylcholinesterase inhibitor and angiotensin receptor blocker initiators to assess the impact of IPCW in a different context.
Results
We identified 335 469 SSRI initiators and 24 318 SNRI initiators. While AT estimates (HR: 1.50, 95% CI: 1.30–1.74) were further from the null than ITT estimates (HR: 1.22, 95% CI: 1.12–1.32), applying IPCW attenuated AT estimates using both lagged and non‐lagged models (lagged HR: 1.24, 95% CI: 1.08–1.44; non‐lagged HR: 1.16, 95% CI: 1.00–1.33). In the 337 981 antihypertensive initiators, however, IPCW did not influence AT estimates.
Conclusions
Younger patients were more likely to discontinue SSRIs than SNRIs, resulting in biased AT estimates closer to estimates in older patients. IPCW attenuated this bias, highlighting the utility of weighting when censoring is linked to patient characteristics.
Keywords: as‐treated, CPRD, informative censoring, intention‐to‐treat, inverse probability weighting, IPCW, observational data
Summary.
As‐treated (AT) analyses estimate effects of starting and adhering to treatment but are vulnerable to selection bias from informative censoring.
Informative censoring occurs when outcome predictors are associated with censoring.
Inverse probability of censoring weights (IPCW) reweight uncensored patients to resemble censored patients and can be applied either before censoring occurs (using a non‐lagged model) or after censoring has already occurred (using a lagged model).
In a cohort with differential censoring by age, IPCW weights using both non‐lagged and lagged models changed AT estimates, highlighting how IPCW can reduce selection bias in AT analyses.
1. Introduction
Randomized controlled trials can be analyzed using intention‐to‐treat (ITT) and as‐treated (AT) approaches. Analogous approaches in observational studies are often referred to as initial‐treatment or first treatment carried forward (for ITT) or on‐treatment (for AT). ITT‐style approaches estimate effects of initiating treatment but may not reflect effects of sustained treatment in populations with high discontinuation rates [1, 2, 3, 4]. On the other hand, AT approaches estimate effects of sustained treatment at the cost of selection bias when patients who discontinue systematically differ in outcome risk from those who continue (a type of informative censoring) [5, 6, 7]. Standard survival analysis methods are not suited to analyze data impacted by informative censoring because they assume reasons for censoring are unrelated to the outcome [8].
Inverse probability of censoring weights (IPCW) address informative censoring by creating a pseudo‐population where uncensored individuals similar to those who were censored are given more influence [9, 10, 11, 12]. Weights uncensored individuals receive are based on covariate‐conditional probabilities of remaining uncensored [9, 11]. These probabilities can be estimated using different methods including Cox regression, the Kaplan–Meier estimator, or logistic regression [13]. Ideally, censoring weights are estimated and applied whenever a patient is censored to immediately adjust for censoring, as when using Cox and Kaplan–Meier methods. In large non‐experimental datasets, however, it may be too time‐consuming and computationally intensive to fit models at every censoring time, particularly when bootstrapping is required for robust confidence intervals. One way to avoid this problem is using interval‐censored data that splits patient follow‐up into time intervals to estimate weights in each interval. Previously, little attention has been given to the fact that weights for interval‐censored data can either reweigh the cohort at the start (i.e., non‐lagged weights) or end of intervals (i.e., lagged weights).
To demonstrate these approaches, we created a cohort of first‐time selective serotonin reuptake inhibitors (SSRIs) and serotonin‐norepinephrine reuptake inhibitors (SNRIs) users in the United Kingdom during COVID‐19. Hazard ratios and incidence rate differences (IRDs) were compared using (1) an ITT analysis with inverse probability of treatment weights (IPTW) to adjust for confounding, (2) an AT analysis with IPTW, and (3) an AT analysis with IPTW and IPCW to adjust for informative censoring. For (3), we compared IPCW using (A) stratified non‐lagged IPCW weights and (B) stratified lagged IPCW weights to adjust for informative censoring at different times within follow‐up intervals. We repeated analyses in first‐time antihypertensive users to evaluate differences between the approaches in an alternative context.
2. Methods
2.1. Data Source
The clinical practice research datalink (CPRD) is the pre‐eminent UK real‐world research service supporting retrospective and prospective public health studies and interventional research [14]. Patient‐level data from CPRD Aurum was linked to the hospital episode statistics (HES) for covariates, the Office of National Statistics (ONS) for date of death, and small area data for deprivation level. Matching was done on patient ID, and no additional steps were taken to evaluate linkage quality.
2.2. Exposure and Outcome
New users of SNRIs and SSRIs were identified between January 1, 2019, and December 31, 2022, using National Product Codes. Patients were excluded if they were under 18, had fewer than 365 days of lookback or follow‐up available in the CPRD, or were not linkable to HES, ONS, or small area data. All‐cause mortality was ascertained based on the earliest dates of death available from CPRD and ONS records. We additionally created an analogous cohort of new users of acetylcholinesterase inhibitors (ACEIs) and angiotensin receptor blockers (ARBs) to assess these methods in a population with potentially different treatment discontinuation patterns.
2.3. Follow‐Up
Follow‐up started on the day of first prescription for the treatment of interest. In ITT analyses, patients were followed up until departure from the CPRD, last data collection date of the practice, death (the outcome), or 2 years since study entry (Figure 1). In the AT analysis, patients were censored after a gap of more than 30 days in their treatment supply or if they switched treatments. Treatment supply was identified from the prescription information, and we improved the accuracy of the days' supply variable using quantity and dosage. If more than 30 days elapsed between the end of a fill and the date of the next prescription, patients were censored 30 days after the end of the last fill.
FIGURE 1.

Study design. Figure depicting the design of the study for the intention‐to‐treat (at the top) and as‐treated (at the bottom) analyses.
2.4. Confounding Adjustment
We used IPTW to adjust for confounding by computing propensity scores from the following baseline covariates: year of cohort entry, age group, sex, ethnicity, socioeconomic deprivation index, and history of various medical conditions and clinical events. These conditions included anxiety, arrhythmia or conduction disorders, insertion of a pacemaker or defibrillator, hyperlipidemia, hypertension, depression, epilepsy, left ventricular hypertrophy, heart failure, cerebrovascular disease, ischemic heart disease, peripheral vascular disease, valvular heart disease, hepatic disease, chronic renal disease, stroke, chronic obstructive pulmonary disease (COPD), myocardial infarction, cardiomyopathy, hypokalemia, and suicidal ideation and self‐harm. “Unknown” categories were used for missing deprivation and ethnicity, and patients with missing sex were excluded.
2.5. Selection Bias Adjustment
IPCW accounted for potential selection bias arising from restricting the study population to those remaining on treatment in the AT analysis. Despite being called “inverse probability of censoring weights,” IPCWs represent the inverse of the probability of remaining uncensored due to treatment discontinuation given treatment group and patient characteristics [11]. IPCW relies on the assumption that there are no unmeasured confounders associated with the outcome and censoring times and on positivity of being uncensored; if this holds true, the weights can in theory fully correct for bias due to informative censoring [15, 16].
Follow‐up was split into ten intervals based on the distribution of censoring times due to treatment discontinuation or switch. To do so, we identified deciles of the censoring distribution and visually examined the number of patients censored throughout intervals to adapt percentiles defining intervals. A stratified multivariable logistic regression model estimated probabilities of remaining uncensored based on updated values of the covariates in the IPTW model, treating each interval as an observation. Censoring weights were estimated separately for each treatment to allow parameters in censoring models to differ by treatment.
Two models to estimate weights were compared: (A) a stratified non‐lagged model and (B) a stratified lagged model. Define as an indicator for being uncensored ( if a patient was not censored due to discontinuation or switch by the start of a follow‐up interval, and otherwise). In the stratified non‐lagged model (A), the probability of remaining uncensored for an individual in interval was defined as
where is the follow‐up interval, is the time‐specific vector of covariates for each patient, and is the treatment (0 for SNRIs and 1 for SSRIs). This model reweighs the cohort before patients are actually censored, making it best suited when censoring occurs towards the start of the interval rather than the end of an interval. An example of IPCW computation based only on sex is illustrated in Figure 2.
FIGURE 2.

Example of IPCW based on sex. In this example, IPCW weights are computed based solely on the probability of being uncensored due to treatment discontinuation by sex. Some male patients are lost to follow‐up within each interval, so each male participant remaining in the study in each interval is upweighted and “steps in” for the male patients lost to follow‐up. The same is true for female patients.
In the stratified lagged model (B), the probability of remaining uncensored each interval is estimated using the probability of remaining uncensored in the previous interval using a prediction that excludes individuals who died during the interval. All patients are given a probability of being uncensored of 1 between cohort entry and the first interval. The lagged model corrects for censoring after patients have already been censored and is best suited when censoring occurs towards the end of the interval. Final IPCW weights were obtained from the cumulative IPCW throughout a patient's follow‐up and multiplied with IPTW weights to obtain a single weight for the analyses.
2.6. Main Analyses
We estimated crude and adjusted hazard ratios (HRs) and IRDs. Weighted Cox proportional hazard models estimated HRs with a sandwich estimator for robust confidence intervals. Incidence rates were calculated as the number of deaths per person‐time at risk, and the population was bootstrapped 1000 times for robust confidence intervals for IRDs.
Analytical code to create tables, figures, and analysis results is available at https://github.com/gwenaubrac/ipcw‐methods. R version 4.4.0 [17] was used and details of specific packages used are given in supplemental material. The final data used for this study were extracted in June 2024. This manuscript is aligned with guidance from the Reporting of Studies using Observational Routinely Collected Health Data (RECORD) statement. Code lists are available upon request.
2.7. Sensitivity Analyses
For AT analyses, the grace period was changed to 90 days and varied based on the days of treatment supply of the previous fill. A pooled (rather than stratified) model was also used to compute the IPCW weights. To evaluate treatment effect heterogeneity, the analyses were repeated for subgroups based on sex (male vs. female) and age (< 65 vs. ≥ 65).
3. Results
3.1. Cohort Description
In total, 360 106 patients were in the antidepressant cohort (Figure 3) and 337 981 patients were in the antihypertensive cohort (Table S1 and Figure S1). Treatment groups were imbalanced in terms of baseline characteristics, but balance was achieved after IPTW (Table 1, Figure 4). Patients on SNRIs tended to be older (SMD: 0.832), have a lower baseline prevalence of depression (SMD: 0.534), and have a higher baseline prevalence of certain comorbidities like hypertension (SMD: −0.560) and hyperlipidemia (SMD: −0.430). Patients on ARBs were older and had a higher prevalence of cardiovascular conditions.
FIGURE 3.

Flowchart of new antidepressant users included in the study. Flowchart describing the number of patients identified in the CPRD meeting the inclusion and exclusion criteria for two cohorts: first‐time users of SNRIs and SSRIs (common antidepressant medications) and first‐time users of ARBs and ACEIs (common antihypertensive medications).
TABLE 1.
Demographic and clinical characteristics of new SNRI and SSRI users.
| SNRI (N = 24 318) | SSRI (N = 335 469) | SMD | IPTW a SNRI (N = 362 216) | IPTW a SSRI (335 469) | IPTW a SMD | |
|---|---|---|---|---|---|---|
| Demographic characteristics | ||||||
| Age in years, mean (SD) | 58.6 (17.2) | 43.5 (19.1) | 0.832 | 44.7 (19.4) | 44.5 (19.4) | 0.012 |
| Age group, n (%) | 0.903 | 0.029 | ||||
| 18–24 | 765 (3.1%) | 64 767 (19.3%) | 68 457 (18.9%) | 65 533 (18.2%) | ||
| 25–34 | 1723 (7.1%) | 72 935 (21.7%) | 75 172 (20.6%) | 74 659 (20.8%) | ||
| 35–44 | 2945 (12.1%) | 59 912 (17.9%) | 62 073 (17.1%) | 62 855 (17.5%) | ||
| 45–54 | 4888 (20.1%) | 52 548 (15.7%) | 55 784 (15.4%) | 57 425 (16.0%) | ||
| 55–64 | 4696 (19.3%) | 33 995 (10.1%) | 38 031 (10.5%) | 38 678 (10.8%) | ||
| 65–74 | 4275 (17.6%) | 20 892 (6.2%) | 25 603 (7.1%) | 25 172 (7.0%) | ||
| 75–84 | 3850 (15.8%) | 20 018 (6.0%) | 24 899 (6.9%) | 23 885 (6.6%) | ||
| 85+ | 1176 (4.8%) | 10 402 (3.1%) | 12 196 (3.4%) | 11 579 (3.2%) | ||
| Sex, n (%) | 0.054 | 0.018 | ||||
| Male | 14 541 (59.8%) | 191 669 (57.1%) | 151 346 (41.8%) | 153 519 (42.7%) | ||
| Female | 9777 (40.2%) | 143 800 (42.9%) | 210 869 (58.2%) | 206 265 (57.3%) | ||
| Ethnicity, n (%) | 0.326 | 0.045 | ||||
| White | 18 507 (76.1%) | 231 636 (69.0%) | 254 785 (70.3%) | 250 209 (69.5%) | ||
| Non‐white | 3122 (12.8%) | 28 211 (8.4%) | 26 580 (7.3%) | 31 272 (8.7%) | ||
| Unknown | 2689 (11.1%) | 75 622 (22.6%) | 80 851 (22.3%) | 78 304 (21.8%) | ||
| Deprivation index, n (%) | 0.106 | 0.052 | ||||
| 1 | 3978 (16.4%) | 62 326 (18.6%) | 69 831 (19.3%) | 66 300 (18.4%) | ||
| 2 | 4519 (18.6%) | 65 504 (19.5%) | 70 599 (19.5%) | 70 014 (19.5%) | ||
| 3 | 4436 (18.2%) | 63 127 (18.8%) | 68 144 (18.8%) | 67 564 (18.8%) | ||
| 4 | 5293 (21.8%) | 67 965 (20.3%) | 72 991 (20.2%) | 73 252 (20.4%) | ||
| 5 | 5713 (23.5%) | 74 033 (22.1%) | 76 111 (21.0%) | 79 744 (22.2%) | ||
| Unknown | 379 (1.6%) | 2514 (0.7%) | 4541 (1.3%) | 2910 (0.8%) | ||
| Clinical characteristics | ||||||
| Discontinued treatment, n (%) | ||||||
| Overall | 20 836 (85.7%) | 295 957 (88.2%) | 297 980 (82.3%) | 307 017 (85.3%) | ||
| Within 1 year | 19 123 (78.6%) | 264 955 (79.0%) | 280 024 (77.3%) | 282 959 (78.6%) | ||
| Switched treatment, n (%) | 645 (2.7%) | 3515 (1.0%) | 16 399 (4.5%) | 3507 (1.0%) | ||
| ITT follow‐up in days | ||||||
| Mean (SD) | 648 (161) | 649 (167) | 655 (160) | 648 (169) | ||
| Median (min, max) | 730 (1.00, 730) | 730 (1.00, 730) | ||||
| AT follow‐up in days | ||||||
| Mean (SD) | 209 (314) | 219 (291) | 180 (208) | 194 (202) | ||
| Median (min, max) | 58.0 (1.00, 730) | 99.0 (1.00, 730) | ||||
| Baseline comorbidities, n (%) | ||||||
| Depression b | 4745 (19.5%) | 145 826 (43.5%) | 0.534 | 152 892 (42.2%) | 150 584 (41.9%) | −0.008 |
| Anxiety | 6275 (25.8%) | 108 381 (32.3%) | 0.144 | 131 706 (36.4%) | 114 725 (31.9%) | −0.099 |
| Hypertension | 10 848 (44.6%) | 65 242 (19.4%) | −0.560 | 76 674 (21.2%) | 76 086 (21.1%) | < 0.01 |
| Hyperlipidemia | 6136 (25.2%) | 31 273 (9.3%) | −0.430 | 38 724 (10.7%) | 37 421 (10.4%) | −0.008 |
| Suicidal ideation and self‐harm | 1430 (5.9%) | 19 427 (5.8%) | −0.004 | 26 557 (7.3%) | 20 916 (5.8%) | −0.065 |
| Chronic renal disease | 2843 (11.7%) | 14 844 (4.4%) | −0.269 | 17 930 (5.0%) | 17 690 (4.9%) | −0.001 |
| Arrhythmia | 2192 (9.0%) | 14 160 (4.2%) | −0.194 | 17 272 (4.8%) | 16 369 (4.5%) | −0.009 |
| Stroke | 1690 (6.9%) | 10 348 (3.1%) | −0.178 | 13 464 (3.7%) | 12 060 (3.3%) | −0.017 |
| COPD | 1559 (6.4%) | 8811 (2.6%) | −0.183 | 11 459 (3.2%) | 10 389 (2.9%) | −0.013 |
| Cerebrovascular disease | 1351 (5.6%) | 8695 (2.6%) | −0.150 | 11 003 (3.0%) | 10 060 (2.8%) | −0.012 |
| Ischemic heart disease | 1624 (6.7%) | 7818 (2.3%) | −0.211 | 9818 (2.7%) | 9444 (2.6%) | −0.004 |
| Heart failure | 1408 (5.8%) | 7903 (2.4%) | −0.174 | 9879 (2.7%) | 9318 (2.6%) | −0.007 |
| Hepatic disease | 1438 (5.9%) | 7794 (2.3%) | −0.181 | 9431 (2.6%) | 9230 (2.6%) | −0.002 |
| Epilepsy | 828 (3.4%) | 7161 (2.1%) | −0.077 | 12 295 (3.4%) | 8027 (2.2%) | −0.071 |
| Peripheral vascular disease | 1233 (5.1%) | 4919 (1.5%) | −0.204 | 6530 (1.8%) | 6162 (1.7%) | −0.005 |
| Valvular heart disease | 795 (3.3%) | 5310 (1.6%) | −0.110 | 6540 (1.8%) | 6112 (1.7%) | −0.007 |
| Myocardial infarction | 1024 (4.2%) | 5040 (1.5%) | −0.163 | 6262 (1.7%) | 6069 (1.7%) | −0.003 |
| Left ventricular hypertrophy | 837 (3.4%) | 4640 (1.4%) | −0.134 | 5611 (1.5%) | 5485 (1.5%) | −0.002 |
| Pacemaker | 472 (1.9%) | 2488 (0.7%) | −0.104 | 2992 (0.8%) | 2961 (0.8%) | < 0.01 |
| Hypokalemia | 366 (1.5%) | 2593 (0.8%) | −0.069 | 3654 (1.0%) | 2965 (0.8%) | −0.017 |
| Cardiomyopathy | 138 (0.6%) | 847 (0.3%) | −0.049 | 939 (0.3%) | 984 (0.3%) | 0.002 |
Note: Bolded values represent significant imbalance (SMD > 0.1) in that covariate between treatment groups.
Abbreviations: AT, as‐treated; COPD, chronic obstructive pulmonary disease; CPRD, clinical practice research datalink; IPTW, inverse probability of treatment weight; ITT, intent‐to‐treat; SD, standard deviation; SNRI, serotonin and norepinephrine reuptake inhibitors; SSRI, selective serotonin reuptake inhibitors.
In the IPTW model, an interaction term between age group and anxiety was added to achieve balance.
Depression at the start of the second interval of follow‐up was used instead of depression at cohort entry to account for under‐coding of this condition in administrative data.
FIGURE 4.

Propensity score distribution in new antidepressant users after IPTW weighting. For each treatment, the distribution of the propensity scores is plotted, which is the probability of receiving the treatment given observed covariates. This score is used to calculate IPTW weights to adjust for confounding. Overlap of the propensity score distributions between treatments indicates balance in the covariates.
3.2. ITT Versus AT Results
Estimated HRs differed between ITT and AT analyses in the antidepressant users (Table 2, Figure 5). In the ITT analysis, the HR for all‐cause mortality associated with being on an SSRI compared to an SNRI was 1.22 (95% CI: 1.12–1.32) and the IRD was 4.08 deaths per 1000 person‐years. The AT analysis yielded a HR of 1.50 (95% CI: 1.30–1.74) and an IRD of 11.79 deaths per 1000 person‐years, suggesting a more harmful association with sustained use. The p‐value for the test of the proportional hazards assumption was < 0.05 for some of the Cox models, but upon examination of the Schoenfeld residual plots [18] the assumption of proportional hazards did not appear violated. In the antihypertensive users, there was no difference between the ITT estimate (HR = 0.91, 95% CI: 0.86–0.96) and the AT estimate (HR = 0.90, 95% CI: 0.82–0.98) (Table S2, Figures S2–S4).
TABLE 2.
Hazard ratios and incidence rate differences of all‐cause mortality in first‐time antidepressant users by model (with IPTW a adjustment).
| HR (95% CI) | IRD b (95% CI) | |
|---|---|---|
| Without IPCW adjustment | ||
| ITT | 1.22 (1.12–1.32) | 4.08 (2.70–5.29) |
| AT | 1.50 (1.30–1.74) | 11.79 (8.24–14.99) |
| With IPCW a , c adjustment | ||
| AT—stratified lagged weights d | 1.25 (1.08–1.44) | 5.47 (2.65–8.06) |
| AT—stratified non‐lagged weights e | 1.16 (1.00–1.33) | 2.09 (−0.32 to 4.39) |
Note: 12 893 ITT events and 6315 AT events.
Abbreviations: AT, as‐treated; CI, confidence interval; HR, hazard ratio; IPCW, inverse probability of censoring weight; IPTW, inverse probability of treatment weight; IRD, incidence rate difference; ITT, intent‐to‐treat.
In the IPTW model, an interaction term between age group and anxiety was added to achieve balance.
Per 1000 person‐years.
In the IPCW model, an interaction term between age group and anxiety was added, and cardiomyopathy and hypokalemia were removed due to violations of the positivity assumption in certain follow‐up intervals.
Model fitted excluding intervals in which patients died in the follow‐up interval. The model fitted including patients who died yielded a HR of 1.24 (1.08, 1.44) and IRD of 4.94 (2.18, 7.34).
Model fitted including intervals in which patients died in the follow‐up interval. The model fitted excluding patients who died yielded a HR of 1.16 (1.00, 1.33) and an IRD of 2.90 (0.92, 4.72).
FIGURE 5.

Forest plot of hazard ratios for all‐cause mortality in first‐time antidepressant users by model. Plot showing the point estimates of hazard ratio for all‐cause mortality among first‐time users of SNRIs and SSRIs, with 95% confidence intervals indicated by solid lines. The reference group is SNRIs, so estimates on the right‐hand side of the dotted line (1.0, null association) indicate a harmful association of SSRIs on the outcome. All models adjust for confounding through IPTW weights. The x‐axis is plotted on a log‐scale.
3.3. Informative Censoring in AT Analyses
In the antidepressant users, most patients were censored on Day 58 due to one‐time prescriptions, so follow‐up was split into the 35th, 42nd, 49th, 57th, 64th, 71st, 78th, 86th, and 93rd percentiles of censoring times in the AT analyses. HRs changed in magnitude after adjusting for informative censoring through IPCW. Results changed slightly depending on the model used to define the IPCW weights. Lagged weights led to results closest to the AT (and furthest from the null), with a HR of 1.25 (95% CI: 1.08–1.44) and an IRD of 5.47 (95% CI: 2.65–8.06). On the other hand, non‐lagged weights led to estimates closer to the ITT (and to the null), with a HR of 1.16 (1.00–1.33) and an IRD of 2.09 (95% CI: −0.32 to 4.39). In the SSRI group, cumulative incidence of all‐cause mortality was lower after adjusting for censoring and diverged between censoring models starting around 100 days of follow‐up (Figure 6).
FIGURE 6.

Cumulative incidence of death by model in new SSRI users. Plot showing the cumulative incidence of all‐cause mortality for first‐time SSRI users. The dotted lines represent the cumulative incidence without IPCW adjustment for the ITT analysis (red) and the AT analysis (purple). The solid lines represent the cumulative incidence for the different IPCW models. In SSRI users, the cumulative incidence diverged between models starting around 100 days of follow‐up.
The strongest predictors of censoring were younger age and lower deprivation index. In certain intervals, there were no patients with certain covariates, which led to positivity violations across bootstrap iterations. We removed these variables from the model and assumed that since they occurred rarely in the sample, they would not significantly affect the weights. In antihypertensive users, around half of patients discontinued their treatment within 1 year, but censoring was not differential between treatment groups. Consequently, IPCW weights did not influence the AT estimates, regardless of whether weights were lagged or not.
3.4. Sensitivity Analyses
When increasing the grace period to 90 days, estimates from AT analyses with or without IPCW adjustment were closer to ITT estimates. Conversely, a flexible grace period based on previous fills shifted estimates further from the ITT. Applying IPCW weights from pooled models generated similar results to stratified models. Estimates from main analyses were also consistent in subgroups defined by sex, with a slight change in magnitude for males, for which the estimated effect of SSRIs was more harmful compared to females. Exact results from the subgroup and sensitivity analyses can be found in Tables S3–S14.
3.5. Subgroup Analyses
The direction of the association changed in age‐based subgroups. In younger adults (< 65), estimated effects of SSRIs were protective in all analyses. Conversely, estimated effects of SSRIs in older adults were harmful (≥ 65). To better understand this finding, the relationship between censoring and age by treatment was explored post hoc. Censoring due to treatment discontinuation resulted in increased amounts of older age groups in the SSRI cohort over time as younger patients discontinued treatment early while middle‐aged and older patients continued treatment (Figure 7), the opposite of what one would expect given known associations between age and mortality that would lead to a depletion of susceptible individuals in older age groups. The resulting change in the age composition of the cohort was not corrected after applying IPTW alone but was effectively reduced after applying combined IPTW and IPCW. Differential censoring by age was not observed in the antihypertensive cohort.
FIGURE 7.

Censoring by age between new users of SNRIs and SSRIs. The prevalence of different age group percentiles over follow‐up intervals for the SNRI and SSRI treatment groups. The results are shown for the unweighted cohort (a), the IPTW‐weighted cohort (b), and the IPTW‐ and IPCW‐weighted cohort (c) using stratified non‐lagged weights for illustration. In the unweighted and IPTW‐weighted cohorts, there is a decrease in the proportion of younger patients in the SSRI group as the study goes on, suggesting differential censoring by age. This change is reduced in the IPTW‐ and IPCW‐weighted cohort.
4. Discussion
4.1. General Conclusions
As‐treated analyses are vulnerable to selection bias introduced by informative censoring, particularly when censoring is related to patient characteristics associated with outcome risk [19]. Applying IPCW to patient follow‐up split into intervals can mitigate this bias, regardless of whether the weights are applied at the start (i.e., non‐lagged weights) or at the end (i.e., lagged weights) of the intervals. We recommend plotting the distribution of censoring times to examine censoring patterns throughout the study. Different approaches can be used to split data into intervals, using either percentiles of the distribution or fixed times. The intervals can then be re‐examined visually to determine whether the bulk of patients are censored towards the start or the end of the intervals. Dates at which this distribution can vary (e.g., after first prescription and grace period) should be considered when defining the intervals. If there is a clear trend towards censoring at the start (or end) of intervals, the non‐lagged weights (or lagged weights) will be more appropriate to avoid pre‐emptive (or late) adjustment of person‐time.
4.2. Informative Censoring Among SSRI Users
In a simple example, associations between all‐cause mortality and new use of SSRIs versus SNRIs were stronger in AT analyses than ITT analyses. Using IPCW, we demonstrated that younger and healthier patients were more likely to discontinue SSRIs than SNRIs, leading to accrual of older patients over time in the SSRI group and selection bias away from the null in the original AT analysis. This bias was further increased by the harmful association between SSRIs and mortality in older adults and the protective association in younger adults (i.e., effect measure modification by age). This differential censoring by age was not observed in a different population of new antihypertensive medication users, even though treatment discontinuation rates were also high in that population.
4.3. Future Research
While this work focused on demonstrating the impacts of IPCW rather than drawing causal conclusions about the effect of initiating SSRIs compared to SNRIs, the substantive results in subgroups by age are interesting. The harmful association estimated in adults over 65 is not surprising. Past research has suggested that the safety profile of SSRIs is less favorable in older adults due to increased risks of hyponatremia [20, 21], falls [20, 22], and bleeding. However, the protective association observed in younger patients is less well documented and may present an opportunity for future research, better accounting for treatment indication and other mental‐health‐related confounding variables. Studies comparing SSRIs and SNRIs in very young patients are of variable quality and generated mixed evidence regarding effectiveness for treating depression and suicidality [23, 24, 25]. There is also limited evidence comparing SNRIs and SSRIs, and current data do not support the use of SNRIs as a primary treatment in youth depression [26, 27, 28].
We focused on two straightforward approaches to using IPCW in real‐world interval censored data. Further research into the best way to perform these analyses (e.g., pooled vs. stratified models, defining follow‐up intervals when censoring distributions are skewed) in simulated and real‐world contexts would further assist researchers using these methods to adjust for selection bias. Comparing the performance of lagged or non‐lagged weights from logistic regression to weights from Cox or Kaplan–Meier approaches in simulated or smaller real‐world datasets may also be beneficial. Finally, alternative approaches to efficiently compute IPCW in large datasets would be helpful for researchers working in claims and EHR data.
4.4. Strengths and Limitations
The CPRD is a high‐quality data source [14] and was linked to HES and ONS to obtain more precise information on covariates and outcome dates. However, the CPRD only provides information on prescribed, not dispensed medications, over‐the‐counter prescriptions, or prescriptions administered in a hospital setting. Exact birth dates were also not available for most patients, so a conservative approach was used to retain patients above 18 at cohort entry by assuming unknown birth dates to be December 31st of the birth year. This may have led to the exclusion of some 18‐year‐old patients from the cohort. We were also forced to recategorize the CPRD's ethnicity variable as “White,” “Non‐white,” and “Unknown” due to violations of the positivity assumption when bootstrapping, reducing our ability to adjust for confounding by ethnicity. Overall, this work makes informative censoring adjustment more accessible to researchers unfamiliar with these methods by presenting a computationally‐ and time‐efficient way of applying IPCW in large observational data.
5. Conclusion
While IPCW may provide limited benefit in some AT contexts, this method can substantially reduce bias in populations with high rates of covariate‐associated treatment discontinuation and heterogeneous treatment‐outcome associations. Both lagged and non‐lagged IPCW can be applied to interval‐censored data when the population is too large to accommodate recalculating weights at each censoring interval.
5.1. Plain Language Summary
To find out if a medication is safe and effective, researchers often look at people who take their medicine as their doctor advises and compare their health to those who don't take it. By focusing on those who stick to their treatment, we might miss important information about those who stop taking their medication. This can lead to incorrect conclusions, especially if the two groups are very different. For example, some people might stop taking their medication because they feel better, while others might stop because they're too sick to continue. To overcome this, a statistical method called inverse probability of censoring weighting (IPCW) is used to create an artificial group of only people who stick to their treatment, using information about those who stop. In this study, we compared the risk of death with and without IPCW in new users of antidepressants and new users of medications for heart problems. Using the IPCW method changed the results in the antidepressant group, as it turns out that younger people stopped their treatment more than older people. This shows that IPCW is a useful method to study medications when some people are more likely to stop their medication than others.
Ethics Statement
The study protocol was approved by CPRD's Research Data Governance Committee (protocol # 24_004042) and the Research Ethics Board of the Jewish General Hospital (protocol # JHG‐2025‐2325), Montreal, Canada.
Conflicts of Interest
The authors declare no conflicts of interest.
Supporting information
Data S1: Supporting Information.
Acknowledgments
Since this study used anonymized data, patient consent was not obtained. This work was funded by the Canadian Institute of Health Research (PJT‐186279).
Aubrac G., Webster‐Clark M., and Platt R. W., “Comparing IPCW Models to Adjust for Informative Censoring During COVID‐19 Using Data From the Clinical Practice Research Datalink,” Pharmacoepidemiology and Drug Safety 34, no. 10 (2025): e70235, 10.1002/pds.70235.
Funding: This work was supported by the Canadian Institutes of Health Research (PJT‐186279).
References
- 1. Lund J. L., Richardson D. B., and Stürmer T., “The Active Comparator, New User Study Design in Pharmacoepidemiology: Historical Foundations and Contemporary Application,” Current Epidemiology Reports 2, no. 4 (2015): 221–228, 10.1007/s40471-015-0053-5. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2. Lewis J. A., “Statistical Principles for Clinical Trials (ICH E9) an Introductory Note on an International Guideline,” Statistics in Medicine, 1999. [DOI] [PubMed]
- 3. Hollis S. and Campbell F., “What is Meant by Intention to Treat Analysis? Survey of Published Randomised Controlled Trials,” BMJ 319, no. 7211 (1999): 670–674, 10.1136/bmj.319.7211.670. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4. Obermeier D. M., “Intention‐To‐Treat (ITT) vs. Per Protocol (PP) Analysis in Clinical Trials,” CliNFo.EU – Ideas, Tools, Knowledge & Best Practices in Clinical Research, April 18, 2018, accessed May 31, 2024, https://www.clinfo.eu/itt‐vs‐pp/.
- 5. Willems S. J. W. and Fiocco D. M., “Inverse Probability Censoring Weights for Routine Outcome Monitoring Data”. [DOI] [PubMed]
- 6. Smith V. A., Coffman C. J., and Hudgens M. G., “Interpreting the Results of Intention‐to‐Treat, Per‐Protocol, and as‐Treated Analyses of Clinical Trials,” Journal of the American Medical Association 326, no. 5 (2021): 433–434, 10.1001/jama.2021.2825. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7. Howe C. J., Cole S. R., Lau B., Napravnik S., and Eron J. J. J., “Selection Bias due to Loss to Follow up in Cohort Studies,” Epidemiology 27, no. 1 (2016): 91–97, 10.1097/EDE.0000000000000409. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8. Chesnaye N. C., Stel V. S., Tripepi G., et al., “An Introduction to Inverse Probability of Treatment Weighting in Observational Research,” Clinical Kidney Journal 15, no. 1 (2021): 14–20, 10.1093/ckj/sfab158. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9. Robins J. M. and Finkelstein D. M., “Correcting for Noncompliance and Dependent Censoring in an AIDS Clinical Trial With Inverse Probability of Censoring Weighted (IPCW) log‐Rank Tests,” Biometrics 56, no. 3 (2000): 779–788, 10.1111/j.0006-341X.2000.00779.x. [DOI] [PubMed] [Google Scholar]
- 10. Robins J. M. and Rotnitzky A., “Recovery of Information and Adjustment for Dependent Censoring Using Surrogate Markers,” in AIDS Epidemiology: Methodological Issues, ed. Jewell N. P., Dietz K., and Farewell V. T. (Birkhäuser, 1992), 297–331, 10.1007/978-1-4757-1229-2_14. [DOI] [Google Scholar]
- 11. Robins J. M., Rotnitzky A., and Zhao L. P., “Analysis of Semiparametric Regression Models for Repeated Outcomes in the Presence of Missing Data,” Journal of the American Statistical Association 90, no. 429 (1995): 106–121, 10.1080/01621459.1995.10476493. [DOI] [Google Scholar]
- 12. Robins J. M., Hernán M. Á., and Brumback B., “Marginal Structural Models and Causal Inference in Epidemiology,” Epidemiology 11, no. 5 (2000): 550–560, 10.1097/00001648-200009000-00011. [DOI] [PubMed] [Google Scholar]
- 13. Matsouaka R. A. and Atem F. D., “Regression With a Right‐Censored Predictor Using Inverse Probability Weighting Methods,” Statistics in Medicine 39, no. 27 (2020): 4001–4015, 10.1002/sim.8704. [DOI] [PubMed] [Google Scholar]
- 14. “Introduction to CPRD,” 2024, accessed June 28, 2024, http://www.cprd.com/introduction‐cprd.
- 15. Willems S., Schat A., van Noorden M., and Fiocco M., “Correcting for Dependent Censoring in Routine Outcome Monitoring Data by Applying the Inverse Probability Censoring Weighted Estimator,” Statistical Methods in Medical Research 27, no. 2 (2018): 323–335, 10.1177/0962280216628900. [DOI] [PubMed] [Google Scholar]
- 16. Cole S. R. and Hernán M. A., “Constructing Inverse Probability Weights for Marginal Structural Models,” American Journal of Epidemiology 168, no. 6 (2008): 656–664, 10.1093/aje/kwn164. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 17. “R: A Language and Environment for Statistical Computing,” 2024, https://www.r‐project.org/.
- 18. Schoenfeld D., “Partial Residuals for the Proportional Hazards Regression Model,” Biometrika 69, no. 1 (1982): 239–241, 10.1093/biomet/69.1.239. [DOI] [Google Scholar]
- 19. McCoy C. E., “Understanding the Intention‐To‐Treat Principle in Randomized Controlled Trials,” Western Journal of Emergency Medicine 18, no. 6 (2017): 1075–1078, 10.5811/westjem.2017.8.35985. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20. Dolder C., Nelson M., and Stump A., “Pharmacological and Clinical Profile of Newer Antidepressants,” Drugs and Aging 27, no. 8 (2010): 625–640, 10.2165/11537140-000000000-00000. [DOI] [PubMed] [Google Scholar]
- 21. Sultana J., Spina E., and Trifirò G., “Antidepressant Use in the Elderly: The Role of Pharmacodynamics and Pharmacokinetics in Drug Safety,” Expert Opinion on Drug Metabolism and Toxicology 11, no. 6 (2015): 883–892, 10.1517/17425255.2015.1021684. [DOI] [PubMed] [Google Scholar]
- 22. Darowski A., Chambers S. A. C. F., and Chambers D. J., “Antidepressants and Falls in the Elderly,” Drugs and Aging 26, no. 5 (2009): 381–394, 10.2165/00002512-200926050-00002. [DOI] [PubMed] [Google Scholar]
- 23. Bridge J. A., Iyengar S., Salary C. B., et al., “Clinical Response and Risk for Reported Suicidal Ideation and Suicide Attempts in Pediatric Antidepressant Treatment: A Meta‐Analysis of Randomized Controlled Trials,” Journal of the American Medical Association 297, no. 15 (2007): 1683–1696, 10.1001/jama.297.15.1683. [DOI] [PubMed] [Google Scholar]
- 24. Teicher M. H., Glod C., and Cole J. O., “Emergence of Intense Suicidal Preoccupation During Fluoxetine Treatment,” American Journal of Psychiatry 147, no. 2 (1990): 207–210, 10.1176/ajp.147.2.207. [DOI] [PubMed] [Google Scholar]
- 25. Beasley C. M., Dornseif B. E., Bosomworth J. C., et al., “Fluoxetine and Suicide: A Meta‐Analysis of Controlled Trials of Treatment for Depression,” BMJ 303, no. 6804 (1991): 685–692, 10.1136/bmj.303.6804.685. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26. Jane Garland E., Kutcher S., Virani A., and Elbe D., “Update on the Use of SSRIs and SNRIs With Children and Adolescents in Clinical Practice,” Journal of Canadian Academy of Child and Adolescent Psychiatry 25, no. 1 (2016): 4–10. [PMC free article] [PubMed] [Google Scholar]
- 27. Brent D., Emslie G., Clarke G., et al., “Switching to Another SSRI or to Venlafaxine With or Without Cognitive Behavioral Therapy for Adolescents With SSRI‐Resistant Depression: The TORDIA Randomized Controlled Trial,” Journal of the American Medical Association 299, no. 8 (2008): 901–913, 10.1001/jama.299.8.901. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 28. Hammad T. A., Laughren T., and Racoosin J., “Suicidality in Pediatric Patients Treated With Antidepressant Drugs,” Archives of General Psychiatry 63, no. 3 (2006): 332–339, 10.1001/archpsyc.63.3.332. [DOI] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data S1: Supporting Information.
