Causal inference in survival analysis using longitudinal observational data: Sequential trials and marginal structural models

Longitudinal observational data on patients can be used to investigate causal effects of time‐varying treatments on time‐to‐event outcomes. Several methods have been developed for estimating such effects by controlling for the time‐dependent confounding that typically occurs. The most commonly used is marginal structural models (MSM) estimated using inverse probability of treatment weights (IPTW) (MSM‐IPTW). An alternative, the sequential trials approach, is increasingly popular, and involves creating a sequence of “trials” from new time origins and comparing treatment initiators and non‐initiators. Individuals are censored when they deviate from their treatment assignment at the start of each “trial” (initiator or noninitiator), which is accounted for using inverse probability of censoring weights. The analysis uses data combined across trials. We show that the sequential trials approach can estimate the parameters of a particular MSM. The causal estimand that we focus on is the marginal risk difference between the sustained treatment strategies of “always treat” vs “never treat.” We compare how the sequential trials approach and MSM‐IPTW estimate this estimand, and discuss their assumptions and how data are used differently. The performance of the two approaches is compared in a simulation study. The sequential trials approach, which tends to involve less extreme weights than MSM‐IPTW, results in greater efficiency for estimating the marginal risk difference at most follow‐up times, but this can, in certain scenarios, be reversed at later time points and relies on modelling assumptions. We apply the methods to longitudinal observational data from the UK Cystic Fibrosis Registry to estimate the effect of dornase alfa on survival.


Introduction
Longitudinal observational data on patients can allow for the estimation of treatment effects over long follow-up periods and in diverse populations. A key task when aiming to estimate causal effects from observational data is to account for confounding of the treatment-outcome association. With 1 arXiv:2110.03117v1 [stat.ME] 7 Oct 2021 longitudinal data on treatment and outcome, the treatment-outcome association may be subject to so-called time-dependent confounding. Such confounding is present when there are time-dependent covariates affected by past treatment, also affecting later treatment use and outcome. Over the last two decades a large statistical literature has built up on methods for estimating causal treatment effects in the presence of time-dependent confounding, and their use in practice is becoming more widespread.
In this paper we focus on estimating the effects of a longitudinal treatment regime on a time-to-event outcome, using longitudinal observational data on treatment and covariates obtained at approximately regular visits, alongside the time-to-event information. When there is time-dependent confounding, standard methods for survival analysis, such as Cox regression with adjustment for baseline or timeupdated covariates, do not in general enable estimation of causal effects. Several methods have been described for estimating the causal effects of longitudinal treatment regimes on time-to-event outcomes. Marginal structural models (MSMs) estimated using inverse probability of treatment weighting (IPTW) were introduced by Robins et al. 1 and extended to survival outcomes by Hernan et al. 2 through marginal structural Cox models. A review by Clare et al. in 2019 3 found this approach to be by far the most commonly used in practice, and we refer to this as the MSM-IPTW approach. An alternative but related approach, which we refer to as the 'sequential trials' approach, was described by Hernan et al. in 2008 4 and then Gran et al. in 2010 5 . In the sequential trials approach, artificial 'trials' are mimicked from a sequence of new time origins which could, for example, be defined by study visits at which new information is recorded for each individual who remains under observation. At each time origin individuals are divided into those who have just initiated the treatment under investigation and those who have not yet initiated the treatment. Within each mimicked trial, individuals are artificially censored at the time at which their treatment status deviates from what it was at the time origin, if such deviation occurs. Inverse probability of censoring weighting is used to account for dependence of this artificial censoring on time-dependent characteristics. Effects of being treated or untreated starting from each time origin can then be estimated using, for example, weighted pooled logistic or Cox regression. There have been several applications of the sequential trials approach. Danaei et al.(2013) 6 applied it to electronic health records data to estimate the effect of statins on occurrence of coronary heart disease. Clark et al. (2015) 7 studied whether onset of impaired sleep is followed by changes in health related behavior. Bhupathiraju et al. (2017) 8 investigated the effect of hormone therapy use on chronic disease risk in the Nurses' Health Study. Some papers have also used the sequential trials approach alongside other methods and compared the results empirically. Suttorp et al (2015) 9 studied the effect of high dose of a particular agent used in kidney disease patients on all-cause mortality with both a sequential trials approach and MSM-IPTW using data from a longitudinal cohort. Thomas et al. (2020) 10 used the sequential trials approach together with sequential stratification and time-dependent propensity score matching when studying the effect of statins on cardiovascular outcomes using the Framingham Offspring cohort.
The sequential trials approach is attractive because it mimics a series of randomized trials in a fairly straightforward and explicit manner. Several recent papers have advocated to emulate a 'target trial' in investigations of causal effects using observational data [11][12][13][14][15] . The target trial is the hypothetical randomized controlled trial that one would like to conduct. The use of target trials provides a structured framework that guides the steps of an investigation, with the target trial protocol including specification of eligibility criteria, time origin, and the estimands of interest. There is strong link between the target trial framework of Hernan and Robins (2016) 11 and the general roadmap for causal inference proposed by Petersen and van der Laan (2014) 16 . These approaches help to avoid biases in estimation of treatment effects using observational data, and to clarify assumptions and methodology.
Applications of the sequential trials approach, including in the original papers of Hernan et al. 4 and Gran et al. 5 , have focused on estimation of hazard ratios. However, it has not been discussed in detail what the formal causal interpretation of this hazard ratio is and Gran and Aalen (2019) 17 highlighted the need for further work to establish the causal estimand being estimated. This is important both to clarify the interpretation and to inform simulation studies to study the properties of the estimators. Karim et al. (2018) 18 compared the sequential trials approach with MSM-IPTW based on Cox models using simulations, but did not account for the fact that the two analyses estimate different quantities, which are therefore not directly comparable 17 . The aim of this paper is to formally describe what and how causal estimands can be identified using the sequential trials approach in a time-to-event setting and to contrast these with estimands typically identified using MSM-IPTW. We show that the causal parameter estimated from the sequential trials approach can be described in terms of the parameters of a particular marginal structural model. We also establish more broadly what estimands the two approaches are suitable for identifying, what assumptions are needed and how the data are used differently.
In the causal inference literature on the sequential trials approach and MSM-IPTW for time-to-event outcomes, the focus has mostly been on Cox proportional hazard models and estimation of hazard ratios. However, Aalen additive hazard models for hazard differences are increasingly being used, both in general to avoid the proportional hazards assumption and in causal inference due to their useful property of being collapsible 19 . We will therefore outline methods in terms of both proportional and additive hazards models. As hazard ratios, and generally also hazard differences, have been shown not to have a straightforward causal interpretation [20][21][22] , we demonstrate how marginal survival probabilities can be obtained under both hazard models for both the sequential trials and MSM-IPTW approaches, using a simple standardization procedure. This enables results from hazard models to be converted into more meaningful causal quantities such as risk differences or risk ratios. The two approaches are compared in a simulation study, in which we assess their relative efficiency for estimation of the same quantities, making use of the properties of additive hazards models 23 .
The paper is organised as follows. In Section 2 we describe a motivating example, in which the aim is to estimate the effect of long term use of the treatment dornase alfa on the composite outcome of death or transplant for people with cystic fibrosis (CF), using longitudinal data from the UK Cystic Fibrosis Registry. In Section 3 we introduce notation and describe the components of a general target trial in this context. In Section 4 we outline estimation using the MSM-IPTW approach and the sequential trials approach, showing how the latter can also be understood as fitting a particular MSM, and in Section 5 we discuss in detail the similarities and differences between the two approaches. The two approaches are then compared using a simulation study in Section 6, and applied to the motivating example in Section 7. Accompanying R code for performing the simulation is provided at https://github.com/ruthkeogh/sequential trials. We conclude with a discussion in Section 8. Our focus is on MSM-IPTW and the sequential trials approach.   24 described historyadjusted MSMs (HA-MSM), which are connected to both approaches, but which have not been used much in practice, perhaps due to initial criticisms of the method 25,26 . In Section 8 we discuss the link between HA-MSM and MSM-IPTW and the sequential trials approach.

Motivating example
As a motivating example we will investigate the long term impacts of a treatment used in CF on the composite time-to-event outcome of death or transplant. CF is an inherited, chronic, progressive condition affecting around 10,500 individuals in the UK and over 70,000 worldwide [27][28][29] . Survival in CF has improved considerably over recent decades and the estimated median survival age for a person born with CF in the UK today is 51.6 for males and 45.7 for females 27,30,31 .
One of the most common symptoms of CF is a build up of mucus in the lungs, which leads to an increased prevalence of bacterial growth in the airways and a decline in lung function 32 . Therefore, it is common for people with CF to routinely use aerosolized mucoactive agents, which help to break down the layer of mucus in the lungs making clearance easier. Recombinant human deoxyribonuclease, commonly known as dornase alfa (DNase), is one such mucolytic treatment which was authorised for use in January 1994. DNase is the most commonly used treatment for the pulmonary consequences of CF in the UK, used by 67.6% of people in 2019 27 . It is a nebulised treatment, administered daily on a long term basis. The efficacy of DNase for health outcomes in CF has been studied in several randomized controlled trials 33 . Most trials had short term follow-up and focused on the impact of DNase on lung function. Seven trials from the 1990s investigated mortality as a secondary outcome but follow-up was short and findings inconclusive; a meta-analysis based on these studies gave a risk ratio estimate of 1.70 (95% CI 0.70 to 4.14) comparing users versus non-users 33 .
The effect of DNase use on lung function and requirement for intravenous antibiotics was investigated using observational data from the UK CF Registry 34,35 . We now use the UK CF Registry to investigate the impact of DNase on the composite outcome of death or transplant through emulation of a target trial. The majority of transplants in people with CF are lung transplants, however we consider any transplant here. The UK CF Registry is a national, secure database sponsored and managed by the Cystic Fibrosis Trust 36 . It was established in 1995 and records demographic data and longitudinal health data on nearly all people with CF in the UK, to date capturing data on over 12,000 individuals. Data are collected in a standardized way at designated (approximately) annual visits on over 250 variables in several domains, and have been recorded using a centralised database since 2007. In this study we use data from 2008 to 2018, plus some data on prior years to define eligibility according to our criteria outlined below. At each annual visit it is recorded whether or not an individual had been using DNase in the past year. We identified potential confounders of the association between DNase use and death or transplant based on expert clinical input, and these include both time-fixed and time-dependent variables -see Section 7. We focus on the impact of initiating and continuing use of DNase on the risk of death or transplant up to 11 years of follow-up compared with not using DNase. In Section 7 we describe the target trial protocol for addressing this question and how it is emulated using the observational data.

Target trial and notation
We begin by outlining a general target trial protocol in the context of estimating the effect of a longitudinal treatment regime on a time-to-event outcome, using the elements recommended by Hernan and Robins 11 . This is a protocol for a hypothetical trial that, if possible, could have been performed to estimate the estimand of interest. We will later focus on how to emulate this trial when we have longitudinal observational data on treatment, covariates and the outcome.

Eligibility criteria
Individuals are eligible to enter the trial from the first time that they meet a specified criteria (for example based on age, clinical characteristics and counter-indicators to the treatment in question) during a particular recruitment period. Individuals who have previously used the treatment or treatments under study are not eligible.

Treatment strategies
We consider a binary treatment A (treatment or control), and let A 0 denote treatment status from the time they enter the trial (time 0) onwards. Individuals are assigned to the treatment or control group, which they are asked to sustain throughout follow-up. Those who sustain the treatment throughout follow-up have A 0 = 1, and those who do not use treatment throughout follow-up have A 0 = 0.

Assignment procedures
At the time of entering the trial, individuals are randomized to the treatment group (A 0 = 1) or the control group (A 0 = 0). In a real trial, double-or single-blind assignment of the treatment would be desirable in contexts where blinding is feasible. However, it is not realistic to emulate blinding when the target trial is emulated using the observational data at hand. Therefore in the target trial both participants and their clinical teams are aware of their treatment group.

Follow-up period
Individuals are followed up from randomization, at t = 0, until the time of the event of interest T , the time horizon of interest τ , or censoring C, whichever occurs first.

Outcome
The observed outcome for a given individual isT = min(T, C, τ ).

Causal estimands of interest
Let us define T a 0 =1 as the counterfactual event time had an individual received the treatment from time zero onwards ('always treated') and T a 0 =0 as the counterfactual event time had an individual not received the treatment from time zero onwards (at least for the follow-up time of interest) ('never treated'). We can then define our causal estimands of interest as contrasts between functions of the distributions of T a 0 =1 and T a 0 =0 . These correspond to per-protocol effects because they involve comparisons between outcomes if treatment level a (a = 0, 1) were sustained throughout the followup period.
Effects of treatments on time-to-event outcomes can be quantified in a number of ways. A common measure is the ratio of hazards between the treatment and control groups, made under the assumption that hazards are proportional over the period of follow-up, h T a 0 =1 (t)/h T a 0 =0 (t) = e β , where h T a 0 =a (t) denotes the hazard in the hypothetical world in which all individuals are observed in treatment group a (a = 0, 1). However, as hazard ratios do not have a straightforward causal interpretation, it is additionally advisable to consider causal contrasts between risks [20][21][22] . In this paper we will focus on the risk difference as the primary estimand of interest: This risk difference contrasts the risk of the event by the time horizon τ , under the conditions of being 'always treated' versus 'never treated'. There may be several time horizons of interest, i.e. different values of τ , and we let τ max denote the maximum time horizon for which the risk difference is to be obtained. Alternative quantities with a causal interpretation are the risk ratio Pr(T a 0 =1 > τ )/ Pr(T a 0 =0 > τ ) and contrasts between restricted mean survival times E(min(T a 0 , τ )) 37 .

Analysis plan for the target trial
If the target trial in fact could have been implemented, the estimation of the causal risk difference in (1) would make use of analysis methods for randomized controlled trials. In a randomized controlled trial in the absence of non-adherence or informative drop-out, the counterfactual event times are independent of the treatment, i.e. T a 0 ⊥ ⊥ A 0 for all a 0 . Under this assumption, the causal risk difference of interest is equal to the observed risk difference: The risks Pr(T > τ |A 0 = a) (a = 0, 1) could, for example, be estimated nonparametrically using the Kaplan-Meier estimator. In practice, non-adherence and informative drop-out are often present, and the analysis should take account of this, with IPTW being one possible approach.
4 Emulating the target trial using longitudinal observational data

Observational data set-up
Let us now assume a setting in which individuals are observed at regular 'visits' (data collection times) over a particular calendar period, reflecting the type of data that arise in our motivating example and in similar data sources. Let t = 0 denote the start of follow-up, defined as the time at which a patient meets the eligibility criteria. We assume a 'closed cohort' such that all individuals in the study cohort were included at the same calendar time. In practice, some historical data are typically required to establish whether an individual meets the eligibility criteria at time t = 0, e.g. past treatment status. The cohort is assumed to be followed up to (at least) the maximum time horizon of interest for the risk difference, τ max . Information on treatment status and other covariates is observed at visits k = 0, 1, . . . , K, and the time of visit k is denoted t k . Without loss of generality, we assume that t k = k, for k ≥ 0, and K = τ max denotes the time of most recent visit before time τ max ( τ max < τ max ). At each visit k we observe a binary treatment status A k and a set of time-dependent covariates L k . To simplify the notation, each L k (k = 0, 1, . . .) also includes any time-fixed covariates. A bar over a time-dependent variable indicates the history, that isĀ k = {A 0 , A 1 , . . . , A k } andL k = {L 0 , L 1 , . . . , L k }. An underline indicates the future, so that A k = {A k , A k+1 , . . .} denotes treatment status from time k onwards.
The data set-up is illustrated in the directed acyclic graph (DAG) in Figure 1, using a discrete-time setting where Y k = I(t k−1 ≤ T < t k ) is an indicator of whether the event occurs between visits k − 1 and k. One can imagine extending the DAG by adding a series of small time intervals between each visit, at which events are observed (but not A or L, which are assumed constant between visits). As the time intervals become very small we approach the continuous time setting. From the DAG, we can see that L k are time-dependent confounders. Time-dependent confounding occurs when there are time-dependent covariates that predict subsequent treatment use, are affected by earlier treatment, and affect the outcome through pathways that are not just through subsequent treatment. The DAG also includes a variable U , which has direct effects on L k and Y k but not on A k . U is an unmeasured individual frailty and we include it because it is realistic that such individual frailty effects exist in practice. Because U is not a confounder of the association between A k and Y k (after controlling for the observed confounders), the fact that it is unmeasured does not affect our ability to estimate causal effects of treatments. The DAG could be extended in various ways, for example, we could incorporate long term effects of L on A and vice versa by adding arrows from L k to A k+1 and from A k to L k+2 . Long term effects of A and L on survival could also be added, for example by adding arrows from L k and A k to Y k+2 .

The emulated trial
Next, we outline how the target trial outlined in Section 3 is emulated using the observational data described above. Each element of the target trial protocol should be considered. The eligibility criteria, treatment strategies, assignment strategies, and outcome in the emulated trial should be the same as far as possible as those in the target trial. An iterative process is appropriate when designing the target trial protocol, to take into consideration knowledge about the observational data. In some settings there may be some differences in eligibility criteria in the target trial and the emulated trialfor example, if the study pertains to individuals diagnosed with a particular infection, in the target trial a laboratory-confirmed diagnosis may be specified, whereas this may not possible in the emulated trial if diagnosis route is not recorded in the available observational data. There may also be differences in some aspects of treatment, for example the target trial may specify the dose of the treatment, whereas dose information may not be available in the observational data and so the emulated trial is pragmatic about dose. Making clear the differences between the target trial and the emulated trial can help us to understand possible sources of bias when we emulate the target trial using observational data.
The causal estimand of interest for the emulated trial is the same as that in the target trial. In our setting, the causal estimand compares marginal risks in a follow-up period τ under two treatment regimes: always treated (a 0 = 1) or never treated (a 0 = 0). In the observational data, individuals who are untreated initially can subsequently start treatment and vice versa. Treatment initiation and treatment switching may depend on time-dependent patient characteristics that also affect the outcome, as illustrated in the DAG in Figure 1. This must be addressed in the analysis, and the analysis stage is where we find the biggest differences between the emulated trial and target trial. However, we emphasise that the causal estimand in the emulated trial is the same as in the target trial. The time-dependent confounding is addressed in different ways in the MSM-IPTW approach and the sequential trials approach. We now describe how to estimate the causal risk difference (expression (1)) using these two approaches.

Analysis using MSM-IPTW
In the MSM-IPTW approach, a MSM is specified for the hazard. The counterfactual hazard under the possibly counter-to-fact treatment regime a 0 is denoted h T a 0 (t). In a slight abuse of standard notation we let t denote the time of the most recent visit before time t (so t is always < t), and a t denotes treatment pattern up to the most recent visit prior to t. The MSM is usually assumed to take the form of a Cox proportional hazards model 38 where h 0 (t) is the baseline counterfactual hazard, and g(ā t ; β A ) is a function of treatment pattern a t to be specified, and β A is a vector of log hazard ratios. However, the hazards could take various other forms and we will also consider MSMs based on Aalen's additive hazard model 39,40 , which has the form h T a 0 (t) = α 0 (t) + g(ā t ; α A (t)), where α 0 (t) is the baseline counterfactual hazard and α A (t) is a vector of time-dependent coefficients. In both hazard models the g(·) function equals zero whenā t = 0. In a simple version of the MSM, the hazard at time t is assumed to depend only on the current level of treatment: g(ā t ; β A ) = β A a t or g(ā t ; α A (t)) = α A (t)a t . Other options include that the hazard depends on duration t k=0 a k ; or on the history of treatment in a more general way, g(ā t ; β A ) = t k=0 β Ak a k or g(ā t ; α A (t)) = t k=0 α Ak (t)a k . The MSM cannot be estimated directly from the observed data because of time-dependent confounding by L k . In the MSM-IPTW approach, individuals are assigned time-dependent weights and the MSM is fitted to the observed weighted data. The weight at time t for a given individual is the inverse of the probability of their observed treatment pattern up to time t given their time-dependent covariate history,L t . These weights can be large for some individuals, which induces large uncertainty in estimates from the MSM, and stabilized weights are typically used instead. The use of MSMs estimated using IPTW to estimate causal effects of joint treatments over time involves the four key assumptions of no interference, positivity, consistency, and conditional exchangeability (i.e. no unmeasured confounding) 1,2,41 . Details on the weights and the assumptions are provided in the Supplementary Material (Sections A1 and A2). Weights are also discussed in detail in the context of the simulation study in Section 6.
The MSM can also be extended to include conditioning on baseline covariates L 0 : When covariates L 0 are included in the MSM, they can also be included in the model in the numerator of the stabilized weights.
The survival probabilities required for the estimand in (1) can be estimated using the relation between the hazard and survivor functions. For the Cox MSM in (3) we have where the integrated (cumulative) baseline hazards can be estimated using an IPTW Breslow's estimator. Based on the Aalen MSM in (4) we have where the integrals are obtained as the cumulative coefficients estimated in the Aalen additive hazard model fitting process. The probabilities of interest under the longitudinal treatment regimes of 'always treated' and 'never treated' (Pr(T a 0 =a > τ ), a = 0, 1) are the obtained by setting a 0 = a in (7) or (8). These probabilities are marginal and they refer to the population of n individuals meeting the target trial eligibility criteria at t = 0; we denote this population by C 0 . The MSMs including baseline covariates, as in (5) and (6), can be used to obtain the conditional probabilities Pr(T a 0 =a ≥ τ |L 0 ) for each individual in C 0 . Estimates of the marginal survival probabilities Pr(T a 0 > τ ) can then be obtained using empirical standardization: where Pr(T and where the integrals are estimated as outlined above for (7) or (8). In practice, the empirical standardization can be done by creating two copies of each individual in C 0 and setting A 0 = A 1 = . . . = A τ = 1 for one copy and A 0 = A 1 = . . . = A τ = 0 for the other. The covariate values L 0,i are the same for both copies. The estimated conditional survival probabilities are then obtained for each individual under both treatment regimes (i.e. for both copies), and then the average calculated across individuals under both treatment regimes.
If it is of interest to estimate the causal risk difference in (1) for several time horizons τ , it is recommended to fit the MSM using all event times up to τ max and with administrative censoring at τ max to obtain risk difference estimates for all horizons τ ≤ τ max , rather than fitting separate MSMs for different time horizons.
Confidence intervals for the estimated causal risk difference can be obtained by bootstrapping. The weights models and the MSM are fitted in each bootstrap sample, so that the bootstrap confidence intervals capture the uncertainty in the estimation of the weights as well as in the MSM.

Analysis using the sequential trials approach
In the MSM-IPTW approach each individual contributes to the emulated target trial from visit k = 0, at which time they meet the eligibility criteria. However, individuals may in fact meet the eligibility criteria for the target trial at more than one visit during the study period. In the sequential trials approach an individual can contribute to an emulated trial starting from any visit k = 0, 1, 2, . . . at which they meet the eligibility criteria. The emulated trial eligibility criteria are applied at each visit k = 0, 1, . . . to form a sequence of emulated trials. Recall that individuals who have previously used the treatment are not eligible and so all individuals eligible for the kth trial haveĀ k−1 = 0. Those eligible for the kth trial therefore include 'initiators' who start treatment at visit k (A k = 1) and 'non-initiators' who remain untreated at visit k (A k = 0). Non-initiators in trial k can appear as initiators in a later trial (k + 1, . . .). Individuals can therefore appear as initiators in only one trial, but as non-initiators in several trials.
In this paper we focus on a sequential trials approach in which the length of possible follow-up decreases for trials starting at later visits. An alternative would be to use a sequence of trials that all have equal length of follow-up. To explain this further, consider an example in which the observational cohort has visits at times k = 0, 1, 2, 3, 4 and follow-up to time 5 but our maximum time horizon of interest for the causal risk difference (1) is τ max = 3. We could have 5 trials starting at times k = 0, 1, 2, 3, 4, with a decreasing length of follow-up from the start of each trial, such that the trials starting at times k = 0, 1, 2 have follow-up of length 3 or longer (and administrative censoring would be applied after 3 time units of follow-up), and the trials starting at times k = 3, 4 only provide 2 and 1 time units of follow-up respectively. In the alternative we would only make use of trials starting at times k = 0, 1, 2, with administrative censoring applied after 3 time units of follow-up.
The sequential trials approach focuses on comparing survival only under the two treatment regimes: 'always treated', in which eligible individuals initiate treatment and then always continue treatment, and 'never treated', in which eligible individuals do not initiate treatment at the time of meeting eligibility criteria and remain untreated at all later times. Previous descriptions of the sequential trials approach have described the analysis models used but have not been explicit about the causal interpretation of the model parameters. Here we begin by defining MSMs for populations meeting the emulated trial eligibility criteria at visits k = 0, 1, 2, . . . , K and explain how these relate to the estimand of interest in (1). We then outline how the MSMs can be estimated using the observational data under certain assumptions, using the methods described by Hernan et al. 4 and Gran et al. 5 .
Consider the trial starting at visit k. Let T A k =a denote the counterfactual event time under a treatment regime in which individuals follow their observed treatments up to and including visit k − 1 and are then assigned to treatment a (a = 0, 1) from visit k onwards (if they survive to visit k). Let h k,T A k =a (t − k|Ā k−1 = 0,L k ) denote the hazard at time t − k after visit k under this treatment regime, conditional on the baseline characteristics L k at the start of trial k. The time scale is time since the start of the trial. The conditioning onĀ k−1 = 0 indicates the restriction to individuals who have not initiated treatment prior to the start of the kth trial, which is part of the eligibility criteria. MSMs for this hazard using a Cox model and Aalen's additive hazard model are and Recall that L k includes any time fixed covariates. The conditioning on L k could be excluded, but we include it because conditioning on baseline variables is a feature of the previously-described sequential trials analysis methods, which we discuss below. In the Cox MSM (10) the hazards in the treated and untreated could be assumed proportional, f (t − k; β Ak ) = β Ak , or we could allow the hazard to depend on duration of treatment, e.g. af (t − k; β Ak ) = aβ Ak,0 + aβ Ak,1 (t − k). The additive hazards MSM (11) naturally incorporates a flexible time-dependent effect of treatment on the hazard. Both models could be extended to include interactions between A k and L k . The above MSMs are conditional on L k rather thanL k , which is an assumption. They could be written as conditional on L k , but it is likely to be appropriate that the hazard for each trial k depends on the same amount of history of L k . For example, if we wish to allow the hazard for each trial k to depend on L k and L k−1 then the first trial would need to start at time k = 1 instead of k = 0, unless data on the L were available prior to time 0.
Conditional survival probabilities (conditional on L k and T ≥ k) for the counterfactual event times are related to the hazard according to the formula Below we discuss how marginal survival probabilities, and therefore the causal estimand of interest (marginal risk difference), can be obtained. First, however, we outline how the MSMs in (10) or (11), and hence the conditional survival probabilities in (12), can be estimated using the observed data. The MSMs in (10) and (11) cannot be estimated directly from the observational data because not all individuals meeting the eligibility criteria at visit k are then 'always treated' (A k = 1) or 'never treated' (A k = 0). In the sequential trials approach as described by Hernan et al. 4 and Gran et al. 5 individuals are artificially censored at the visit at which they switch from their treatment group at the start of a given trial. In the kth trial individuals are censored at the earliest visit m > k such that A m = A k . This results in a modified data set in which all individuals in the trial starting at time k have either A k = 0 or A k = 1 up to the earliest of their event time, their censoring time, or their artificial censoring time due to treatment switch. The treatment switching is expected to depend on timedependent covariates that are also associated with the outcome, meaning that the artificial censoring is informative. It is addressed using weights, which we refer to as inverse probability of artificialcensoring weights (IPACW). The IPACW at times 0 < s < 1 after the start of trial k are equal to 1. The IPACW at times l ≤ s < l + 1 (l ≥ 1) after the start of trial k is the inverse of the probability that the individual's treatment status at time l remained the same as their treatment status at the start of the trial, A k , conditional on their observed covariates up to time l. The MSMs in (10) and (11) are then fitted using weighted regression using the time-dependent IPACW, with a in the hazard model replaced by the observed treatment status A k . The conditioning on baseline covariates L k in each trial controls for confounding of the association between treatment initiation at time k and the hazard. Estimating the MSMs in this way is valid under the same assumptions of positivity, consistency and conditional exchangeability, as are required for the MSM-IPTW analysis. Further details on the IPACW are provided in the Supplementary Materials (Section A1). Hernan et al. 4 used logistic regression to estimate the IPACW, whereas Gran et al. 5 used Aalen's additive hazard model. The IPACW could be fitted separately in each trial or combined across trials. After estimating the MSMs using this approach, the expression in (12) can be used to obtain estimates of conditional survival probabilities. The trial starting at k = 0 provides estimates of Pr( , and the trial starting at k = 1 provides estimates of , (a = 0, 1), and so on for k = 2, . . . , K. These are conditional on covariates measured at the start of the trial, L k .
After estimating the conditional survival probabilities in (12) estimates of marginal survival probabilities Pr(T A k =a > τ + k|Ā k−1 = 0, T ≥ k) can be obtained via empirical standardization over the distribution of L k at the start of each trial, as described for the MSM-IPTW approach in Section 4.3. This enables estimation of marginal risk differences: The (true) marginal risk differences for the same time horizon τ after the start of the trial will differ in general for trials starting at different times k = 0, 1, 2, . . . (for trials for which τ ≤ τ max − k). Differences in the true value of the estimand for different trials arise when coefficients of the hazard model ((10) or (11)) depend on k, but also because the marginal risk differences for different k refer to populations with different distributions of baseline characteristics, L k . Marginal risk differences that have the same true value across trials starting at different times k = 0, 1, . . . can be estimated, using assumptions about the coefficients of the hazard models and standardisation to a common distribution of baseline covariates L k . Some or all parameters of the MSMs in (10) and (11) could be assumed common across trials (i.e. for all k). The common parameters can then be estimated by fitting the hazard models using the observed data combined across trials. It may be reasonable in many settings to assume that the impact of the treatment on the hazard at a given time post-initiation does not depend on the visit k at which treatment was initiated, i.e. β Ak = β A and α Ak (t − k) = α A (t − k) for all k. Similarly the coefficients for L k could be assumed constant across trials. Often the underlying time scale t will be in a sense arbitrary. For example, in some settings it will be calendar year, and in others the time since joining a cohort. Provided any elements of time (e.g. age, calendar year) that affect the hazard are included in the set of covariates L k then the baseline hazard may also be assumed common across Suppose that all coefficients of the MSM in (10) and (11) are assumed to be the same across trials (i.e. for all k). The MSM would be fitted using the data combined across trials using a weighted regression with time-dependent IPACW, and with adjustment for baseline covariates in each trial, L k . When estimating the marginal risk differences by empirical standardization it should be specified clearly which population the marginal probabilities refer to. We suggest that the population of interest for the marginal risk difference is not the population of individuals used in the combined analysis, since this population is not well defined and many individuals appear in it more than once. A better alternative is to estimate the risk difference for the population C 0 of individuals meeting the target trial eligibility criteria at t = 0 (visit k = 0). This would make the marginal risk difference comparable with that estimated from the MSM-IPTW analysis. We note that the causal estimand in expression (1) is implicitly conditional on no prior treatment, which is part of the target trial eligibility criteria. Another possibility would be to estimate the risk difference for the population of individuals meeting the target trial eligibility criteria at the last visit time K, as this population might be expected to be the most similar to the patient population now in terms of their distribution of characteristics.
Suppose, instead, that we wish to allow the baseline hazard the differ across trials, but that the coefficients for treatment (a) and baseline covariates (L k ) are assumed the same across trials. The MSMs in(10) or (11) could be fitted using data combined across trials, but with a stratified baseline hazard.
In this case, care should be taken over which baseline hazard is used to obtain the marginal risk difference estimates. For example, the baseline hazard corresponding to the trial starting at k = 0 may be used to obtain the marginal risk difference estimates for all time horizons τ ≤ τ max . This would make the marginal risk difference comparable with that estimated from the MSM-IPTW analysis. The baseline hazard from the trial starting at the penultimate visit K − 1 can only be used to estimate marginal risk difference estimates for time horizons τ ≤ τ max − (K − 1), and using baseline hazards corresponding to trials starting at visit k ≥ 1 to estimate marginal risk differences would result in marginal risk differences that do not correspond to those estimated from the MSM-IPTW analysis.
In their descriptions of the sequential trials approach Gran et al. 5 used the Cox proportional hazards model, and Hernan et al. 4 used pooled logistic regression, which is equivalent as the times between visits gets smaller 43 . Røysland et al. 44 used an additive hazards model, though their aim was to estimate direct and indirect effects, which differs from our aims in this paper. Gran et al. 5 assumed the hazard ratios for treatment in the Cox model to be common across the trials, but allowed a different baseline hazard in each trial. Hernan et al. 4 allowed the odds ratio for treatment to differ across trials and also performed a test for heterogeneity, though it is unclear whether they allowed separate intercept parameters (baseline hazards) across trials. If the treatment effect is assumed the same across trials, it is recommended to assess this assumption using a formal test.
As in the MSM-IPTW approach, confidence intervals for the estimated causal risk difference can be obtained by bootstrapping. The formation of the sequential trials, estimation of the weights, fitting of the conditional MSMs, and obtaining the risk difference are all repeated in each bootstrap sample.
5 Comparing MSM-IPTW and the sequential trials approach 5.1 Estimating causal effects: an illustrative example using a causal tree diagram In this section we show how the MSM-IPTW and sequential trials approaches can estimate the same causal estimand using an illustrative example and non-parametric estimates. Our aim is to provide insight into how the two approaches use the data differently to estimate the same quantity.
Consider a situation as depicted in the DAG in Figure 1, but with treatment and covariate information only collected at up to two visits (L 0 , A 0 measured at time 0, and L 1 , A 1 measured at time 1) and survival status observed at times 1 (Y 1 = I(0 ≤ T < 1)) and 2 (Y 2 = I(1 ≤ T < 2)). We focus on a single binary time-dependent confounder L and omit the unobserved variable U . Figure  2 shows a causal tree graph (see for example Richardson and Rotnitzky 45 ), representing the different possible combinations of the variables L 0 , A 0 , Y 1 up to time 1, and then the different combinations of L 1 , A 1 , Y 2 among individuals who survive to time 1 (Y 1 = 0). A total of n individuals are observed at time 0. The numbers in brackets on the branches of the tree are the number of individuals who followed a given pathway up to that branch. The notation is as follows: n l 0 denotes the number Our interest is in comparing survival probabilities under two treatment regimes: always treated (A 0 = A 1 = 1) and never treated (A 0 = A 1 = 0). The branches representing these two treatment regimes are shown with thick lines in the causal tree diagram. The MSM analysis makes use of the causal tree diagram as depicted in Figure 2. Under the sequential trials approach, we create a trial starting at time 0 and a trial starting at time 1. In the trial starting at time 0 individuals who survive to time 1 are censored at time 1 if A 1 = A 0 , i.e. not all branches after time 1 are used. The trial starting at time 1 is restricted to individuals with A 0 = 0 and Y 1 = 0. The sections of the causal tree diagram for these two trials are shown in Figure 3.
Consider the probability of survival to time 1 with treatment a, Pr(Y A 0 =a 1 = 0). The MSM-IPTW approach estimates this using the results that (under the conditions of consistency, positivity and conditional exchangeability) Based on the tree diagram, a non-parametric estimate of this is where the two contributions come from individuals with L 0 = 0 and L 0 = 1. On the other hand, the sequential trial starting at time 0 estimates Pr(Y A 0 =a 1 = 0|L 0 ). By consistency and conditional exchangeability we have Pr( . Based on the tree diagram, a non-parametric estimate of this using the trial starting at time 0 is Pr( which is the same as the estimate using MSM-IPTW (i.e. equation (15)). Therefore the MSM-IPTW and sequential trials approaches give identical estimates of Pr(Y A 0 =a 1 = 0). The equivalence between inverse probability weighted estimates and standardized estimates obtained using the g-formula in the 13 non-parametric setting is well established (see for example 2,46 ). In the sequential trials approach, the trial starting at time 1 can be used to estimate the probability of survival to time 2 after initiating the treatment strategy (a = 0, 1) conditional on survival to time 1 and on A 1 = 0. The non-parametric estimate is The marginal probability estimate Pr(Y A 0 =a 1 = 0) refers to a population in which Pr(L 0 = 1) = n 1 /n, whereas the marginal probability estimate Pr(Y A 1 =a 2 = 0|Y 1 = 0, A 1 = 0) refers to a population with a different distribution of L 1 . The estimate from the trial starting at time 1 could alternatively be standardized to the distribution of L 0 at time 0: n 0 00,0a + n 0 10,0a n 0 n + n 0,0 00,1a + n 0,0 10,1a n 0 00,1a + n 0 10,1a n 1 n .
= 0) could be obtained from the two trials, for example using an inversevariance-weighted combination of the estimates from the two trials.
We can also show that non-parametric estimates of Pr(YĀ 1 =a 2 = 0) from the two methods are the same. The MSM-IPTW approach uses Based on the tree diagram, a non-parametric estimate of this is where the four contributions come from individuals with the four possible combinations of (L 0 , L 1 ).
The sequential trials approach estimates Pr(YĀ 1 =a 2 = 0|L 0 ), which can be written The term Pr(Y A 0 =a 1 = 0|L 0 ) was considered above. The first term, Pr(YĀ 1 =a Based on the tree diagram, a non-parametric estimate of this is  (20). By comparing (20) and (23) we can see clearly the connection between the weights used in the MSM-IPTW approach and those used in the sequential trials approach (IPACW).

Specification and estimation of MSMs
In practice, model-based estimates are typically required instead of non-parametric estimates, as we usually have multiple time-dependent confounders to consider, including continuous variables. In this section we compare in more detail the form of the MSMs used in the two approaches, and how they are estimated using inverse probability weights.
A key difference in the MSMs used in the two approaches is that in the MSM-IPTW the MSM for the hazard at time t includes the history of treatment up to time t,Ā t , whereas the MSM used in the sequential trials approach involves only the treatment status assigned at the start of the trial. The MSM-IPTW approach therefore requires that the relation between treatment historyĀ t and the hazard is correctly specified, whereas in the sequential trials approach there are limited options for the form of the MSM because only two treatment patterns are considered, because after the artificial censoring all individuals used in the analysis are either always treated or never treated. In MSM-IPTW, when baseline covariates are excluded from the MSM, the MSM is a fully marginal modelthe possibility of interaction between treatment and baseline covariates is not ruled out but does not have to be modelled. If the MSM used in the MSM-IPTW approach includes baseline covariates L 0 then any interactions that exist between treatment and L 0 must be included in the MSM and correctly specified. Similarly, in the sequential trials approach, if there are interactions between treatment and the baseline covariates at the start of each trial, L k , then these must be included in the MSM and correctly specified. MSMs that condition on baseline covariates are therefore more susceptible to misspecification. The sequential trials approach could use weighting in the first time period instead of adjustment for baseline covariates, though that is not how the method has been described or used to date. Conditioning on baseline covariates in the sequential trials approach enables use of empirical standardization to obtain risk difference estimates for a population with any distribution of the baseline covariates. When combined with assumptions about the form of the MSM for the hazard in each trial, this enables us to estimate the same causal estimand in the sequential trials approach as in the MSM-IPTW approach.
If the sequential trials analysis makes the assumption that the effect of treatment on the hazard is the same in all trials, i.e. does not depend on the time of treatment initiation, then the sequential trials approach has information about the effect of treatment initiation from several time origins. If the assumptions are valid, this re-use of individuals from several time origins could lead to gains in efficiency in the marginal risk difference estimate at some time horizons τ relative to the MSM-IPTW approach. On the other hand, in the MSM-IPTW analysis individuals who switch their treatment status during follow-up continue to contribute information to the analysis, whereas in the sequential trials analysis individuals cease to contribute information when they deviate from their treatment group at the start of a given trial. This means that in the sequential trials analysis the number of individuals with longer term follow-up will be smaller than in the MSM-IPTW analysis.
To fit the MSMs, both approaches require time-updated weights, and hence the data should be formatted with multiple rows per individual (one for each visit for MSM-IPTW, and one for each visit within each trial for the sequential trials approach). In the MSM-IPTW approach (without conditioning on baseline covariates), the MSM is estimated by weighting individuals in the observed data using timeupdated weights. In the sequential trials approach the MSM is instead estimated through adjustment in trial k for baseline covariates L k and artificial censoring of individuals when they deviate from their initial treatment group at time k. The artificial censoring is addressed using IPACW. The weight up to time 1 after the start of a given trial is always equal to 1. In the MSM-IPTW approach with conditioning on baseline variables L 0 the IPTW weight at a given time is the same as the IPACW weight used in the sequential trials approach for the trial starting at time 0 for individuals following the 'always treated' or 'never treated' regimes. In the MSM-IPTW approach without conditioning on baseline variables the IPTW weights are proportional to the IPACW weights used in the sequential trials approach. Because the MSM-IPTW approach includes individuals following any treatment regime (not just 'always treated' or 'never treated'), we may expect to see more extreme weights with increasing follow-up, compared with the weights used in the sequential trials approach.
Because the two approaches use the data differently and because the MSM-IPTW approach could make use of more extreme weights, it is of interest to investigate the relative efficiency of the two approaches for estimating the causal estimand. We note that it is only appropriate to consider the relative efficiency of the two approaches when they target the same causal estimand, which, as discussed in section 4.4, requires assumptions that some parameters of the MSM used in the sequential trials approach are common across trials.

Compatibility of MSMs used in the two approaches
In Sections 4.3 and 4.4 we considered MSMs based on Cox models or on additive hazard models. In this section we show that one can use an additive hazard model for the MSM for the sequential trials analysis (expression (11)) (with common parameters assumed across trials) and an additive hazard model for the MSM used in the MSM-IPTW approach (expression (4), without conditioning on L 0 ), and that both MSMs can be correctly specified. However, if we use a Cox model for the MSM for the sequential trials analysis (expression (10)) and a Cox model for the MSM used in the MSM-IPTW approach (expression (3), then both MSMs cannot simultaneously be correctly specified in general. This is because the parameters of additive hazard models are collapsible, whereas hazard ratios in the Cox model are non-collapsible. Martinussen and Vansteelandt (2013) 19  For the MSM-IPTW analysis in this section we again focus on an MSM that is not conditional on L 0 , as in (3),(4). The MSMs used in a MSM-IPTW analysis and in the sequential trials analysis may be considered to be consistent with each other if there exists an underlying fully conditional hazard model that implies both the MSM used in MSM-IPTW and the MSM used in the sequential trials approach, which is conditional on baseline covariates at the start of each trial. As above we consider estimating Pr(Y A 0 =a 1 = 0) (or Pr(T A 0 =a > 1)) and Pr(YĀ 1 =a 2 = 0) (or Pr(T A 1 =a > 2)). First consider a fully conditional additive hazard model of the form Under this model the conditional survival probability at time 1 is and the marginal probability of survival to time 1 is where 1 0 α * 0 (u) = It follows that we could use an additive hazard model for Pr(Y A 0 =a 1 = 0|L 0 ) in the sequential trials analysis and an additive hazard model for Pr(Y A 0 =a 1 = 0) in the MSM-IPTW analysis, and that both models can be correctly specified.
and .
It follows that there exists an underlying conditional hazard model that gives rise to an additive model for the sequential trials analysis and for the MSM-IPTW analysis.
Secondly consider a fully conditional Cox proportional hazards model of the form  Figure 2: Causal tree diagram illustrating a study with a binary treatment A k and binary covariate L k , both measured at two time points (t = 0, 1). Y t is a discrete time survival outcome. Thick lines indicate branches for groups of individuals who were untreated or treated at both time points.
This expression for Pr(Y A 0 =a 1 = 0) is not the form of the survival probability from a marginal Cox proportional hazards model. Therefore, if a Cox model was assumed for h T a 0 (t|L 0 ) in the sequential trials analysis, then this does not imply a Cox model for h T a 0 (t) in the MSM-IPTW analysis, and vice-versa. If Cox models are used for a sequential trials analysis and a MSM-IPTW analysis then the two analyses make different modelling assumptions that cannot both be true. In practice, however, a Cox model could be a good working model for both approaches.
The result in this section has implications for comparing estimates obtained from the MSM-IPTW approach and the sequential trials approach, and we make use of this in the simulation study below by using additive hazards models. 6 A simulation study for the comparison of MSM-IPTW and the sequential trials approach 6

.1 Simulation plan
To evaluate and compare the performance of the two methods in question we will now consider a simulation study based on the data generating simulation algorithm for longitudinal and time-to-event data described by Keogh et al. 23  on the conduct of simulation studies for evaluating statistical methods. R code for replicating the simulation is provided at https://github.com/ruthkeogh/sequential trials.

Aim
Our aim is to compare the MSM-IPTW and sequential trials approaches for estimating the effect of a time-varying treatment on survival, subject to time-dependent confounding, from longitudinal observational data. Our focus is on a setting in which both approaches target the same causal estimand (see below) and hence it is relevant to assess their relative efficiency. Both methods are expected to produce approximately unbiased estimates when the modelling assumptions are met. We hypothesise that the sequential trials analysis could be more efficient than the MSM-IPTW analysis in certain settings, depending on the data generating mechanism and time horizon τ . MSM-IPTW is inefficient when there are extreme weights. The efficiency of the sequential trials approach is expected to depend on the proportion of individuals always in the treatment group or always in the control group, since when many individuals switch over time this would result in few people contributing as follow-up time increases, and the potential for large weights.

Data generating mechanisms
Data are generated according to the DAG in Figure 1. Individuals are observed at up to 5 visits, with administrative censoring at time 5. We consider three simulation scenarios, starting with a 'standard' scenario (scenario 1) and then investigating the performance of the methods when certain aspects of the data generating mechanism are varied. The simulation scenarios are outlined in detail in Table  1. In all scenarios, once an individual starts treatment they remain on treatment, i.e., for any k, there are no individuals that go from A k = 1 to A k+1 = 0. Also in all scenarios there is a single timedependent confounder L, the model for L k conditional on A k−1 , L k−1 ,k and U is the same, and event times are generated according to the same conditional additive hazards model In scenarios 1 and 2 the log odds ratio for L k in the logistic model for the probability of A k = 1 is 0.5, giving 'moderate' dependence of treatment initiation on L k . In scenario 3, the log odds ratio for L k in the logistic model for the probability of A k = 1 is increased to 3, meaning that there is strong dependence of treatment initiation on L k .
In scenario 1 the intercept in the logistic model for the probability of A k = 1 is such that 25% of individuals have A 0 = 1. In scenario 2 the intercept in the logistic model for the probability of A k = 1 is reduced so that the proportion of individuals initiating treatment at a given visit is lower, with approximately 5% having A 0 = 1.
In scenarios 1, 2 and 3, respectively, approximately 57%, 62% and 56% of individuals have the event of interest during the 5 years of follow-up. We do not include any censoring apart from administrative censoring, though extensions to include this are straightforward.
The reason for using an additive hazards model for generating event times is that it enables us to specify a model that is correct under both the MSM-IPTW and the sequential trials analysis, as discussed in Section 5.3, thus enabling a fair comparison between the two approaches.

Estimand
The estimand of interest is the marginal risk difference in (1). We consider time horizons on a continuous scale up to time τ = 5. The population of interest for the marginal risk difference is the set of n individuals observed at time 0.

Methods
The data are analysed using the MSM-IPTW approach and the sequential trials approach. In the MSM-IPTW approach we considered MSMs with and without conditioning on L 0 . When the conditional additive hazard model is as in (32), it can be shown 23 that the correct form for the MSM used in the MSM-IPTW analysis using the MSM that is not conditional on L 0 is and the correct form for the MSM conditional on L 0 is The correct form for the MSM used in the sequential trials analysis, under our data generating mechanism, is The coefficients in the fully conditional hazard model in (32) do not depend on time, and this results in the coefficients in the MSM for the sequential trials analysis being a function of time since the start of the trial, but being the same across trials k = 0, . . . , 4.
We use stabilized weights for all analyses. In the MSM-IPTW approach using the MSM in (33) (without conditioning on L 0 ) the stabilized IPTW at time t are t k=0 and in the MSM-IPTW approach using the MSM in (34) (with conditioning on L 0 ) the stabilized IPTW at time t are t k=0 In the sequential trials approach the stabilized IPACW at time t (for t ≥ 1) after the start of the trial for the trial starting at visit k are (for t ≥ 1) The IPACW are equal to 1 up to time 1 after the start of each trial, i.e. up to time k + 1 for the trial starting at visit k.
The weights take into account that individuals do not stop treatment once they start. In MSM-IPTW we have Pr(A k = 1|Ā k−1 = 1) = 1, Pr(A k = 1|L k ,Ā k−2 , A k−1 = 1) = 1 and Pr(A k = 1|Ā k−1 = 1, L 0 ) = 1. All other probabilities used in the weights were estimated using logistic regression models fitted using all visits combined (k = 0, . . . , 4). The probabilities Pr(A k |Ā k−2 , A k−1 = 0) were estimated using a logistic regression model for A k with a separate intercept for each k, in the subset of individuals with A k−1 = 0. The probabilities Pr(A k |Ā k−2 , A k−1 = 0, L 0 ) were estimated using a logistic regression model for A k with L 0 as a covariate, and allowing both the intercept and the coefficients for L 0 to differ for each k, fitted using the subset of individuals with A k−1 = 0. The probabilities Pr(A k |L k ,Ā k−2 , A k−1 = 0) were estimated using a logistic regression model for A k with L k as a covariate in the subset of individuals with A k−1 = 0, which is the correct model under our data generating mechanism. Similar models were used to estimate the weights for the sequential trials analysis, but with L 0 replaced by L k in trial k for the model used to estimate the probabilities in the numerator of the weights in (38). The models were fitted across all trials combined, which was valid under our data generating mechanism.

Performance measures
We assess the performance of the methods in terms of bias and efficiency of the risk difference estimates. To obtain the bias we need to know the true values. True values for the survival probabilities and the risk difference were obtained by generating data as though from a large randomized controlled trial, as explained in 23 . For this, we first generated L 0 for 1 million individuals, according to the model outlined in Table 1. Two data sets are then created, one in which the 1 million individuals are set to have A k = 1 (t = 0, . . . , 4) ('always treated') and another in which they are all set to have A t = 0 (k = 0, . . . , 4) ('never treated'). In each data set the L k (k = 1, . . . , 4) are then generated sequentially using the model for L k in Table 1, with L k being generated conditional on L k−1 , U and A k . Event times were generated in each data set according to the conditional additive hazard model in (32). The true survival probabilities, and corresponding risk differences, under each treatment strategy ('always treated' and 'never treated') were then obtained using Kaplan-Meier estimates.
Plots are used to present survival probability estimates and bias and efficiency results for the risk differences at time horizons τ in the range from 0 to 5. We also present results for the survival probabilities and risk differences at time horizons τ = 1, 2, 3, 4, 5 in tables. Estimates are accompanied by Monte Carlo errors.

Results
For the MSM-IPTW approach we focus on the results obtained using the MSM conditional on L 0 . Corresponding results for the MSM that is not conditional on L 0 are shown in the Supplementary Materials ( Supplementary Figures A1 and A2). Figure 4 shows the estimated survivor curves under the 'always treated' and 'never treated' regimes under the three simulation scenarios, alongside the true curves. Figure A3 summarises the corresponding results for bias in risk difference estimates. The results are summarised numerically at time points 1, 2, 3, 4, 5 in Table 2. The relative efficiency of the sequential trials approach compared with the MSM-IPTW approach is illustrated in Figure A4. Figure 7 shows plots of the largest weight used in the MSM-IPTW and sequential trials analyses in each of the 1000 simulated data sets, by time-period (because the weights are time-dependent).
In scenario 1 both methods give unbiased estimates of the risk difference at all time points. The sequential trials approach is more efficient up to time 4, after which the MSM-IPTW approach is more efficient. The efficiency gain from the sequential trials approach is greatest at earlier time points and diminishes as time progresses. Figure 7 shows that the sequential trials approach tends to use less extreme weights(IPACW) than the MSM-IPTW approach at the earlier time points, but that by time 4 after potential treatment initiation the IPTW do not appear to be more extreme than than the IPACW. The relative efficiency results are also a function of how the data are used and of modelling assumptions made. Under the assumption that treatment effects on the hazard are the same across trials (which is true under our data generating mechanism), the sequential trials approach uses information about the treatment effect on the hazard in time period 0 < t < 1 from 5 trials, time  In scenario 2, the sequential trials approach gives unbiased estimates of the risk difference at all time points. The MSM-IPTW approach gives unbiased estimates up to around time 3, with the risk difference being slightly biased upwards after time 3. Figure 4 shows that the survivor curve in the always treated group is slightly biased upwards, which we also see in Table 2. The bias is small in magnitude but statistically significant. Figure 7 comparing the IPACW to the IPCW shos that the largest weights tend to be considerably higher in the MSM-IPTW analysis compared with the sequential trials analysis. The difference between the IPACW and IPTW is much greater in scenario 2 compared with scenario 1, with the IPACW tending to be much less extreme than the IPTW at all time points. In scenario 2 the proportion of individuals initiating treatment at a given visit is low.
Supplementary Table A1 shows that in scenario 2 the absolute numbers of individuals in the 'always treated group' is low across all visits. The bias for MSM-IPTW in scenario 2 is therefore attributed to the combination of large weights and finite sample bias due to small numbers of treated individuals. The efficiency plot in Figure A4 shows that the sequential trials analysis is more efficient than MSM-IPTW at all time points. From 4 and Table 2, we see that the variation in the estimates of the survival probabilities is much greater in MSM-IPTW for the 'always treated' regime. For the 'never treated' regime the variation is smaller using the sequential trials approach up to between times 2 and 3, after which the variation in the MSM-IPTW estimates is lower.
In scenario 3, both methods give bias in the risk difference after time 1 ( Figure A3). Figure 4 shows that the survival probabilities for the 'always treated' regime are estimated without bias, but the survival probabilities for the 'never treated' regime have some upwards bias at later time points. The magnitude of the bias is small and similar under both methods. Figure A4 shows that the sequential trials analysis is more efficient up to around time 2.5, and the MSM-IPTW analysis is more efficient thereafter. In this scenario the time-varying covariate L k is strongly predictive of treatment A k (log odds ratio 3). Looking at the distribution of the largest weights in Figure 7 we see that after time 1 there are some very large weights under both methods. The largest weights tended to be higher in the MSM-IPTW approach. The number of individuals observed at each time point is greater under scenario 3 than scenario 2. In this case therefore, the bias may be attributed to near violations of the positivity assumption.
Results are similar from the MSM-IPTW analysis based on the MSM without conditioning on L 0 . We also applied the analyses using truncated weights in which both IPTW and IPACW were truncated at the 95th percentile, which resulted in similar findings -see Supplementary Materials (Supplementary Figure A3 and Figure A4).

The target trial
We apply the methods to the motivating application introduced in Section 2. Table 3 summarises the target trial, which we emulate using longitudinal data on individuals observed in the UK CF Registry between 2008 and 2018, in addition to some data from up to three visits prior to 2008, which was used to ascertain eligibility (see below).
Some initial data set-up steps were taken as follows. The outcome is the composite of death or transplant, so visits recorded after transplant were omitted. Data are intended to be collected at annual visits. However, there are some visits considerably closer and wider apart. We omitted visits that were less than 6 months after the previous visit and where the previous and subsequent visit were less than 18 months apart. For individuals who do not have the event of interest (death or transplant) the censoring date was the earlier of 31 December 2018 and the date of the last visit plus 18 months.
Where there was a period of more than 18 months after a given visit without the event or another visit being recorded, the individual was censored at the date of that visit plus 18 months, and any subsequent later visits excluded. The data allow for a maximum of 11 years of follow-up.
The eligibility criteria for the target trial are people with CF aged 12 or older and who have not used DNase for at least 3 years. For the emulated trial we identify individuals meeting these criteria according to UK CF Registry data recorded between 2008 and 2018. The emulated trial has some additional eligibility criteria that relate to the way in which the data are collected. An individual is defined as being eligible at a given visit if they have at least 3 preceding visits, with the patient recorded as not using DNase at each of those visits, and at least one visit in the prior 18 months. We used this (approximately) 3-year period of non-treatment use to minimise any bias arising from missing treatment data for an individual given year, or a missing annual review. Individuals who may have used DNase in the more distant past were included to increase sample size and because it was considered reasonable that the effect of re-starting DNase in this group would be similar to that for individuals who had never used DNase in the past. To be eligible at a given visit, individuals were also required to have observed measurements of forced expiratory volume in 1 second as percentage predicted (FEV 1 %) and body mass index (BMI) z-score at the visit and the previous visit. The other elements of the protocol are the same for the emulated trial as for the target trial. The treatment strategies are (i) start using DNase and continue using it throughout follow-up, and (ii) do not start using DNase during follow-up. The aim is to estimate risk differences between the two treatment strategies up to 11 years of follow-up.
There was a small amount of missing data in some of the time-dependent covariates. We used the last-observation-carried-forward to address this. For the genotype variable 'missing' was treated as a separate category.

Analysis
The MSM-IPTW analysis and the sequential trials analysis were both applied as outlined in Section 4 to estimate survival curves up to 11 years post-randomization under the two treatment regimes of 'always treat' or 'never treat' with DNase (Table 3), and corresponding risk differences. For the MSM-IPTW analysis an individual's baseline visit (k = 0) was defined as the first visit in the period 2008-2018 at which an individual meets the emulated trial eligibility criteria. For the sequential trials analysis individuals were assessed for eligibility at each visit from the baseline visit onwards, resulting in 11 possible trials.
DNase use is recorded at each annual review visit and refers to whether the patient has been prescribed DNase over the past year. We identified a number of potential confounders, which include both demographic and clinical patient characteristics (see Table 4). These include two time-fixed covariates; sex and genotype class (a marker of the severity of the CF-causing mutation -low, high, not assigned, missing) 48  For each approach we obtained results using a Cox proportional hazards model and an Aalen's additive hazard model (with time-varying coefficients) for the MSMs. In the MSMs used for the MSM-IPTW analysis the MSM included current treatment and treatment in the three prior years, and is conditional on the time-fixed covariates and baseline measures of the time-varying covariates, except visit year. The MSM used in the sequential trials analysis included the same set of covariates as used in the MSM-IPTW analysis, i.e. the time-fixed covariates and time-varying covariates as measured at the visit at the start of each trial. The continuous covariates, age, FEV 1 %,and BMI z-score, were modelled using restricted cubic splines (with 3 knots) in the MSMs. For the sequential trials analysis, we performed tests of whether the coefficient(s) for treatment status differed by trial. There was no evidence of this and so we used a combined analysis across trials. In the analyses using the Cox proportional hazards model we assessed the proportional hazards assumption for the treatment variable(s). In the sequential trials analysis there was no evidence against the proportional hazards assumption for the treatment variable, whereas in the MSM-IPTW analysis there was evidence against the proportional hazards assumption in a joint test for the four treatment variables in the model.
Logistic regression models were used to estimate stabilized weights for use in each analysis method.
In the MSM-IPTW approach the model used for the denominator of the weights included all timefixed covariates and the current values of the time-dependent covariates. The model used for the numerator of the weights included the time-fixed covariates and baseline measures of the time-varying covariates. In these models, DNase status recorded at visit k is assumed to depend on FEV 1 % and BMI z-score recorded at visit k − 1, and on other time-dependent variables as recorded at visit k.
In the simulation we assumed that once an individual initiates treatment they always continue treatment. However, in this application some individuals also stop treatment. In the sequential trials analysis we therefore estimated separate IPACW for artificial censoring due to switching from A k = 0 to A k+1 = 1 and for switching from A k = 1 to A k−1 = 0. The models for the weights included the same variables as included in the weights for the MSM-IPTW analysis. The continuous variables (Age, FEV 1 %, BMI z-score, visit year) were modelled using restricted cubic splines (with 3 knots) in the models for the weights.
For both approaches we also estimated stabilized weights for censoring due to loss-to-follow-up. These included the same variables as used in the treatment-related weights, with the difference that the censoring weights models for the probability of being censored between visits k and k+1 included measures of FEV 1 % and BMI z-score made at visit k, rather than the measures from the previous visit. This is because the censoring indicator at visit k refers to censoring before visit k + 1, whereas the treatment indicator at visit k refers to treatment status since the previous visit.
There was missing data in some of the time-dependent covariates (∼10% missingness in covariates at the baseline visit). We used the last-observation-carried-forward to address this. For the genotype variable 'missing' was treated as a separate category.
We wished to estimate the same marginal survival probabilities, and hence risk differences, using each analysis method. Both methods include conditioning on covariates measured at baseline. We are therefore able to standardize to any appropriate population. For this analysis we standardize to the population of individuals meeting the eligibility criteria in 2018. Visit year was included in the weights models but not in the set of variables included in the MSM. This is because there can only be little information about long term follow-up for individuals in the later years, which results in poor convergence in some models if visit year is included in the MSMs. There are therefore differences between the population to which the MSM-IPTW analyses refer and that to which the sequential trials analyses refer, in terms of the marginal distribution of baseline years from 2008-2017. We consider this to be a minor difference that is unlikely to result in clinically important differences between the results from the two approaches.
Bootstrapping was used to obtain 95% confidence intervals for the estimated survival curves under the two treatment regimes of 'always treat' or 'never treat' with DNase and the corresponding risk differences, using 1000 bootstrap samples and the percentile method.

Data overview
The eligibility criteria were met by 3855 individuals at at least one visit. Among these individuals there were 338 events (266 deaths and 72 transplants). Of the 3517 individuals who did not have the event, 1780 (51%) were administratively censored (defined as having the expected number of visits given their first year of meeting eligibility criteria, assuming one visit each year) and the remainder were censored due to loss-to-follow-up (which included individuals censored after a gap of more than 18 months without a visit). The characteristics of the individuals at the first visit at which the eligibility criteria were met are summarised in Table 4. Table 5 summarises the number of individuals contributing to the MSM-IPTW and sequential trials analyses and their treatment status. The eligibility criteria were first met in 2008 (the first year we considered) by 1729 individuals (45%). In the sequential trials approach many individuals contribute to trials starting at multiple time points such that 18439 rows contribute information at the start of trials (Table 5(b)). At visit k = 10, there remain 643 individuals in the MSM-IPTW analysis but only 241 rows in the sequential trials analysis, due to the artificial censoring in the sequential trials approach. At the first visit at which eligibility criteria were met, 612 initiated DNase treatment (16%). Of those who initiated DNase at this first eligible visit, 69% used DNase at all visits, and of those who did not initiate DNase at the first eligible visit 53% were non-users at all visits. In the MSM-IPTW analysis the proportion of treated individuals is similar across visits, ranging from 15-17%.
In the sequential trials analysis the proportion of treated individuals at a given visit is equivalent to the proportion 'always treated' up to that visit (due to the artificial censoring), and this percentage increases over time from 15% at visit k = 0 to 22% at visit k = 10. Figure 8 shows the estimated survivor curves from the MSM-IPTW and sequential trials analyses, using Cox proportional hazards models and additive hazards models for the MSMs. The corresponding estimated risk differences are shown in Figure 9, where a risk difference greater than 1 indicates better survival in the 'always treated'.

Results
None of the results provide evidence that DNase use affects the outcome, either in the short or long term. In the MSM-IPTW analysis using a Cox proportional hazards model, the survival curve for the 'always treated' regime is consistently below that for the 'never treated' regime, with the differences increasing over time. In the sequential trials analysis using the Cox model the survival curves in the two treatment groups are very similar over time. Using the additive hazards model the survival curve for the 'always treated' regime is above that for the 'never treated' regime for the first few years, more so in the MSM-IPTW results, before the curves cross. As we would expect, the 95% CIs from using the Cox model are narrower than those from the additive hazards model. The 95% CIs are generally narrower under the sequential trials approach, except when using the additive hazards models in the later part of follow-up. Supplementary Figure A5 shows a plot of the distribution of the weights used under the two analysis approaches. This shows that a large number of rows are assigned a weight of 1 in the sequential trials analysis. This is because in the sequential trials data the first row corresponding to each trial has a weight of 1. There are no extreme weights in the MSM-IPTW analysis, but the distribution is less highly concentrated around 1.

Discussion
In this paper we have focused on estimating the effects of longitudinal treatment regimes on survival, using observational data subject to time-varying confounding of the treatment-outcome association.
We have compared the MSM-IPTW approach with the sequential trials approach. A key contribution has been to specify causal estimands that can be identified using the sequential trials approach, and we showed how the previously described implementations can be shown to estimate underlying MSMs for counterfactual outcomes under certain assumptions. The methods were considered in the context of emulating a target trial and we outlined a general protocol for a target trial for longitudinal treatment regimes and time-to-event outcomes. We compared the MSM-IPTW and sequential trials approaches in terms of how the data are used, the form of the MSMs, how time-dependent confounding is addressed through the analysis, and when they identify the same parameters.
For time-to-event outcomes, estimands based on contrasts between risks rather than contrasts between hazards have been shown to have better causal interpretations. We outlined how the outputs from the sequential trials analysis and the MSM-IPTW analysis can be used to obtain marginal absolute risk estimates using empirical standardization, and hence to obtain marginal risk differences or ratios. Care should be taken over defining the population to which marginal risk estimates refer. Applications of the sequential trials approach in the literature have tended to focus on presentation of hazard ratio estimates. As well as giving hazard ratio estimates, Hernan et al.  13 also obtained survival curves using the sequential trials approach but similarly the methods were not described in detail. In this paper, we have provided clear guidance on how to obtain estimated survival curves from the MSM-IPTW and sequential trials approaches.
A key difference between the MSM-IPTW approach and the sequential trials approach is that the MSM-IPTW approach enables estimation of risks under any longitudinal treatment regime, whereas the sequential trials approach focuses only on 'always treated' and 'never treated' regimes. The sequential trials approach could be extended to consider different longitudinal treatment regimes, with individuals being censored when they deviate from a specified regime. This is an area for future investigation. We focused in this paper on a setting in which the trials used in the sequential trials approach have different lengths of follow-up, with trials starting at later times having shorter followup. It would also be possible to focus only on trials with the same fixed length of follow-up. This depends on the total length of follow-up available in the data, and on the time horizons of interest for the risk differences being estimated. For example, in the simulation we consider a situation with 5 visit times. Had we been interested in a risk difference for a time horizon of τ = 2, we could have used sequential trials of equal length starting at times 0,1,2, and 3. For the MSM analysis, the question would arise as to whether to focus on an analysis starting from time 0, or starting from time 3, say. Benefits of using sequential trials of equal length of follow-up could be that it is possible that each trial can estimate a separate baseline hazard covering the full length of follow-up needed for the risk difference.  51 . However, the HA-MSM approach does not yet appear to have been much used in practice, perhaps due to initial criticisms of the method 25,26 . The sequential trials approach is also related to the sequential stratification method described by Schaubel et al. (2006) 52 , in which individuals initiating treatment at a given time point are matched to untreated individuals in a sequential manner over time. The analysis results in an estimate of the treatment effect on the treated. An area for future work is to further discuss the different sequential methods for causal inference for survival outcomes, in particularly to compare the estimands that they focus on and their assumptions.
In this paper we compared the MSM-IPTW and sequential trials approaches using a simulation study, focusing on bias and efficiency. We found that the sequential trials approach can be more efficient than the MSM-IPTW approach for estimating risk differences, but that this is not true at all time points: for risks at time points corresponding to longer follow-up the MSM-IPTW approach can be more efficient. We linked the efficiency gains from the sequential trials approach to the use of less extreme weights (IPACW) compared with the IPTW. It must also be recognised that efficiency gains from the sequential trials approach at some time points arises in part due to assumptions about consistency of the treatment effect across different trials (i.e. from different time origins). Throughout the paper we discussed the methods in terms of Cox proportional hazard models or Aalen additive hazard models for the MSM. Previous work in this context has focused on Cox models for the MSM. We have shown that the additive hazard model can have some advantages in terms of relaxing assumptionsfor example, it naturally allows the hazard to depend on treatment duration in the sequential trials approach. Use of the the additive hazard model was also advantageous in the simulation study as it ensured that the analysis models used in both the MSM-IPTW approach and in the sequential trials approach could both be correctly specified, enabling a fair comparison of the methods. There have been few simulation comparisons of causal methods for time-to-event outcomes due to the challenges of making fair comparisons. As noted earlier, Karim et al.(2018) 18 compared the MSM-IPTW and sequential trials approaches but focused on estimation of hazard ratios and compared efficiency of marginal and conditional hazard ratios, which are not the same quantity. In further work it would be of interest to use a similar simulation approach to compare other methods, including the other sequential methods noted above.
The methods were applied to investigate the effect of the treatment DNase for people with CF on the composite outcome of death or transplant using longitudinal observational data from the UK CF Registry. We did not find any evidence of a causal treatment effect using either the MSM-IPTW approach or the sequential trials approach. In recent work, longitudinal data from the UK CF Registry was used to estimate the longer term causal effect of DNase on the non-time-to-event outcomes of lung function and number of days of intravenous antibiotic medication using MSM-IPTW, g-computation and g-estimation 34,35 . This work found evidence of a benefit of DNase for people with low lung function, but not for those whose lung function was higher. Seaman et al. (2020) 53 illustrated the structural nested cumulative survival time approach with an investigation of the effect of DNase use on survival using UK CF Registry data, and also did not find evidence of a treatment effect. Sawicki et al (2012) 54 used longitudinal data from the US Cystic Fibrosis Foundation patient Registry to investigate the effect of DNase treatment on the risk of death in the next year using pooled logistic regression analyses, finding evidence of a reduced risk of death with DNase use. Limitations of our analysis include that Dnase is used by a large proportion of the population from a young age, and we focused on individuals initiating DNase aged 12 and older, as there are few deaths in younger individuals. It is possible that patients initiating DNase at older ages have particular characteristics that are also associated with survival, and which we did not fully capture in the set of adjustment variables used in our analysis. The number of events in our data was relatively low, which at least in part explains the wide uncertainty on our estimates. Our analysis included a relatively large number of adjustment variables compared to the number of events, which included several continuous variables, and we did not include any interaction terms in the weights models or the MSMs. In further work it would be of interest to investigate data-adaptive methods for flexible adjustment for the timedependent confounders. Another important consideration in interpreting our results is that the UK CF Registry records DNase prescription, but adherence to the treatment is unknown and may be low and dependent on individual characteristics. In further work it would be of interest to use Registry data to investigate the impact of removing DNase treatment, particularly in light of new disease-modifying treatments that have been introduced for CF in recent years.
In summary, the MSM-IPTW and sequential trials approaches can both be used to estimate causal effects of time-varying treatments using observational data, controlling for time-dependent confounding. The sequential trials approach tends to use less extreme weights, which can result in substantial gains in efficiency relative to the MSM-IPTW approach. Both approaches rely on modelling assumptions. The MSM used in MSM-IPTW is prone to misspecification as it considers all treatment patterns, whereas the sequential trials approach focuses only on two regimes. However, the sequential trials approach is prone to model misspecification when a combined analysis across trials is used, and this risk of misspecification is arguably greater than that in the MSM-IPTW approach. The sequential trials approach is appealing in that it makes efficient use of longitudinal data that are often available in observational databases, and that it explicitly mimics a hypothetical trial. There are several areas for further development of this approach that could extend the types questions that it could be used to address.

Data availability
This work used anonymized data from the UK Cystic Fibrosis Registry, which has Research Ethics Approval (REC ref: 07/Q0104/2). The use of the data was approved by the Registry Research Committee. Data are available following application to the Registry Research Committee (https://www.cysticfibrosis.org.uk/the-work-we-do/uk-cf-registry/apply-for-data-from-the-uk-cf-registry).
The authors thank people with CF and their families for consenting to their data being held in the UK CF Registry, and NHS teams in CF centres and clinics for the input of data into the Registry.    We obtained the largest weight in each time period, where in the sequential trials the time refers to time since the start of the trial. In the sequential trials analysis, the IPACW are equal to 1 up to time 1.   Follow-up period Starts at randomization and ends at death or transplant, loss-to follow-up, or the end of 2018, whichever occurs first.
Outcome Death or transplant.
Causal contrasts of interest Per-protocol treatment effect. Survival curves up to 11 years under the two treatment strategies, and corresponding risk differences.
Some individuals can have very large weights, which can results in the parameters of the MSM being estimated very imprecisely, and therefore stabilized weights are typically used. The stabilized weight for individual i is: The model in the numerator of the stabilized weights can also include covariates measured at time 0, L 0 : in which case the MSM must also condition on these variables, as noted in the main text.
The models used in the weights can be estimated using logistic regression, and they may be fitted using all visits combined or separately by visit.

A1.2 Sequential trials
For individuals in the trial starting at visit k but who do not initiate treatment at that time (Ā k = 0) the weight at time t − k from the start of the trial is whereĀ (k,j−1) = {A k , A k+1 , . . . , A j−1 } denotes the treatment status from visit k to visit j − 1. For those who initiate treatment at the start of trial k (Ā k−1 = 0, A k = 1) the weight is 1 Pr(A j = 1|L j,i ,Ā k−1,i = 0,Ā (k,j−1),i = 1, T ≥ k) (A5) In the trial starting at visit k, the weights are equal to 1 for all individuals between time k and k + 1, i.e. up to follow-up time 1 in trial k.
The models used in the weights can be estimated using logistic regression, and they may be fitted using all visits combined or separately by visit, and across all trials combined or separately by trial.

A2 Assumptions
The no interference assumption is that the counterfactual event time for a given individual, T a 0 , does not depend on the treatment received by any other individuals. The positivity assumption is that each individual has a strictly non-zero probability of receiving each given pattern of treatments over time.
Consistency means that an individual's observed outcome is equal to the counterfactual outcome when the assigned treatment pattern is set to that which was actually received, T i = T A 0,i i . The conditional exchangeability assumption can be expressed formally as TĀ k−1 ,a k ⊥ ⊥ A k |Ā k−1 ,L k , T ≥ k for all feasible a k , where TĀ k−1 ,a k denotes the counterfactual event time had an individual followed their observed treatment pattern up to time k − 1,Ā k−1 , and had their treatments been set to a k from time k onwards, given survival to time k. The conditional exchangeability assumption means that among individuals who remain at risk of the event at time k, the treatment A k received at time k may depend on past treatment and covariatesĀ k−1 andL k , but that, conditional on these, it does not depend on the remaining lifetime that would apply if all future treatments were set to any particular values a k .

A3 Compatibility of MSMs used in the two approaches
To obtain expressions (28) and (29)