BACKGROUND: When a clinical treatment fails or shows suboptimal results, the question of when to switch to another treatment arises. Treatment switching strategies are often dynamic because the time of switching depends on the evolution of an individual's time-varying covariates. Dynamic strategies can be directly compared in randomized trials. For example, HIV-infected individuals receiving antiretroviral therapy could be randomized to switching therapy within 90 days of HIV-1 RNA crossing above a threshold of either 400 copies/ml (tight-control strategy) or 1000 copies/ml (loose-control strategy).METHODS: We review an approach to emulate a randomized trial of dynamic switching strategies using observational data from the Antiretroviral Therapy Cohort Collaboration, the Centers for AIDS Research Network of Integrated Clinical Systems and the HIV-CAUSAL Collaboration. We estimated the comparative effect of tight-control vs. loose-control strategies on death and AIDS or death via inverse-probability weighting.RESULTS: Of 43 803 individuals who initiated an eligible antiretroviral therapy regimen in 2002 or later, 2001 met the baseline inclusion criteria for the mortality analysis and 1641 for the AIDS or death analysis. There were 21 deaths and 33 AIDS or death events in the tight-control group, and 28 deaths and 41 AIDS or death events in the loose-control group. Compared with tight control, the adjusted hazard ratios (95% confidence interval) for loose control were 1.10 (0.73, 1.66) for death, and 1.04 (0.86, 1.27) for AIDS or death.CONCLUSIONS: Although our effective sample sizes were small and our estimates imprecise, the described methodological approach can serve as an example for future analyses