Related Experiment Video
Updated: Feb 16, 2026

Inverse Probability of Treatment Weighting Propensity Score using the Military Health System Data Repository and National Death Index
Published on: January 8, 2020
Modeling time-varying exposure using inverse probability of treatment weights
Nathalie Grafféo1,2, Aurélien Latouche3,4, Ronald B Geskus5,6,7
1INSERM U1153, Statistic and Epidemiologic Research Center Sorbonne Paris Cité (CRESS), ECSTRA Team, Saint-Louis Hospital, Paris, France.
Abstract:
For estimating the causal effect of treatment exposure on the occurrence of adverse events, inverse probability weights (IPW) can be used in marginal structural models to correct for time-dependent confounding. The R package ipw allows IPW estimation by modeling the relationship between the exposure and confounders via several regression models, among which is the Cox model. For right-censored data and time-dependent exposures such as treatment switches, the ipw package allows a single switch, assuming that patients are treated once and for all. However, to accommodate multiple switches, we extend this package by implementing a function that allows for multiple and intermittent exposure status in the estimation of IPW using a survival model. This extension allows for the whole exposure treatment trajectory in the estimation of IPW. The impact of the estimated weights on the estimated causal effect, with both methods, is assessed in a simulation study. Then, the function is illustrated on a real dataset from a nationwide prospective observational cohort including patients with inflammatory bowel disease. In this study, patients received one or multiple medications (thiopurines, methotrexate, and anti-TNF) over time. We used a Cox marginal structural model to assess the effect of thiopurines exposure on the cause-specific hazard for cancer incidence considering other treatments as confounding factors. To this end, we used our extended function which is available online in the Supporting Information.
Related Concept Videos
Probability Laws
Probability Distributions
A discrete probability distribution is a probability distribution of discrete random variables. It can be categorized into binomial probability distribution and Poisson...
Probability in Statistics
An example of a simple event is a coin toss. The result of a coin toss is either a head or a tail. Here, head and tail are two simple events. These two simple events make up the sample space. Further, the probability of an event occurring falls within the range of 0 to 1. The probability of an...
Probability Histograms
Poisson Probability Distribution
The...
Gradually Varying Flow

