causality is a topic which nowadays receives much attention .
statisticians , epidemiologists , biostatisticians , social scientists , computer [ especially those in artificial intelligence , see , e.g. , @xcite ( @xcite ) ] , econometricians and philosophers are investigating questions like `` what would have happened if '' and `` what would happen if . ''
this article discusses estimating the effect of a time - varying treatment . as a recurring example , this article focuses on the effect of a medical treatment which is adapted to a patient s state during the course of time .
large observational studies have become widely used in medical research when data from randomized experiments are not available .
randomized clinical trials are often expensive , impractical , and sometimes unfeasible for ethical reasons because treatment is withheld from some patients regardless of medical considerations .
also , in some instances , exploratory investigations using nonexperimental data are used before conducting a randomized trial . in observational studies
there is no pre - specified treatment protocol .
data are collected on patient characteristics and treatments in the course of the normal interaction between patients and doctors . obviously , it is considerably more difficult to draw correct causal conclusions from observational data than from a randomized experiment .
the main reason is the so - called confounding by indication or selection bias .
for example , doctors may prescribe more medication to patients who are relatively unhealthy .
thus , association between medication dose and health outcomes may arise not only from the treatment effect but also from the way the treatment was assigned .
if this confounding by indication only takes place at the start of the treatment , one can condition on initial patient characteristics or covariates , such as blood pressure or number of white blood cells , in order to remove the effect of the confounding , and get meaningful estimates of the treatment effect .
linear regression , logistic regression or cox regression can be used for this purpose . however , estimating treatment effects is more difficult if treatment decisions after the start of the treatment are adapted to the state of the patients in subsequent periods .
treatment might be influenced by a patient s state in the past , which was influenced by treatment decisions before ; thus , simply conditioning on a patient s state in the past means disregarding information on the effect of past treatment .
in such a case , even the well - known time - dependent cox model does not answer the question of whether , or how , treatment affects the outcome of interest .
the time - dependent cox model studies the rate at which some event of interest happens ( e.g. , the patient dying ) , given past treatment- and covariate history .
however , under time - dependent confounding , past covariate values may have been influenced by previous treatment .
the net effect of treatment can thus not be derived from just this rate ; see , for example , @xcite , @xcite or @xcite .
structural nested models , proposed in @xcite , lok , gill , van der vaart and robins ( @xcite ) and robins ( @xcite ) to solve practical problems in epidemiology and biostatistics , effectively overcome these difficulties and estimate the effect of time - varying treatments .
the main assumption underlying these models is that all information the doctors used to make treatment decisions , and which is predictive of the patient s prognosis with respect to the final outcome , is available for analysis .
this assumption of `` no unmeasured confounding '' makes it possible to distinguish between treatment effect and selection bias .
what data have to be collected to satisfy this assumption of no unmeasured confounding is for subject matter experts to decide .
all of the past treatment- and covariate information which both ( i )  influences a doctor s treatment decisions and ( ii )  is relevant for a patient s prognosis with respect to the outcome of interest , has to be recorded . in section  5 of @xcite and in section  8.1 of robins ,
rotnitzky and scharfstein ( @xcite ) , a sensitivity analysis methodology for estimation of structural nested models is developed that does not assume no unmeasured confounders . beyond treatment and covariates
, the data requirements also include the measure of an outcome of interest ; for example , survival time , time to clinical aids or cd4 count after the treatment period .
lok et al .
( @xcite ) study structural nested models in discrete time .
these models assume that changes in the values of the covariates and treatment decisions take place at finitely many deterministic times , which are the same for all patients and known in advance .
lok et al .
( @xcite ) also assume that covariates and treatment take values in a discrete space .
they indicate why it is reasonable to expect consistency and asymptotic normality in discrete time , and they refer to @xcite for the proofs .
@xcite generalize lok et al .
( @xcite ) to covariates and treatment taking values in @xmath0 .    in this article
we consider structural nested models in continuous time , proposed in robins ( @xcite ) .
structural nested models in continuous time allow for both changes in the values of the covariates and treatment decisions to take place at arbitrary times for different patients .
as noted in @xcite , structural nested models in continuous time assume that a short duration of treatment has only a small effect on the distribution of the outcome of interest .
the effect of the treatment on an individual patient may be large , but then the probability of such effect has to be small for any particular short duration of treatment ( see page  7 , bottom ) .
this article provides a conceptual framework and mathematical formalization of these practical methods , solving important outstanding problems and contributing to the causality discussion , especially for the time ordered and continuous time case . in particular
, this article proves the conjectures in @xcite that structural nested models in continuous time lead to estimators which are both consistent and asymptotically normal .
the proof simplifies considerably for structural nested models in discrete time ( see our discussion , section  [ discu ] ) .
this article also proves that a test related to the score test can be used to investigate whether treatment affects the outcome of interest without specifying a model for the treatment effect .
the setting to which structural nested models in continuous time apply is as follows .
the outcome of interest , from now on called @xmath1 , is a continuous real variable .
for example , the survival time of a patient , time to clinical aids , or cd4 count after the treatment period .
we wish to estimate the effect of treatment on the outcome @xmath1 .
there is some fixed time interval @xmath2 $ ] , with @xmath3 a finite time , during which treatment and patient characteristics are observed for each patient .
we suppose that after time @xmath3 treatment is stopped or switched to some kind of baseline treatment . in this article
we assume that there is no censoring , and that the outcome @xmath1 is observed for every patient in the study .
see , for example , @xcite , hernn et al .
( @xcite ) and @xcite for ideas about dealing with censoring .
we denote the probability space by @xmath4 .
the covariate process describes the course of the patient characteristics , for example , the course of the blood pressure and the white blood cell count .
we assume that a realization of this covariate process is a function from @xmath2 $ ] to @xmath5 , and that such a _ sample path _ is continuous from the right with limits from the left ( cadlag ) .
the covariates which _ must _ be included are those which both ( i )  influence a doctor s treatment decisions _ and _ ( ii )  possibly predict a patient s prognosis with respect to the outcome of interest .
if such covariates would not be observed , the assumption of no unmeasured confounding , mentioned in the introduction , will not hold .    for
the moment consider one single patient .
we write @xmath6 for the covariate- _ and _ treatment values at time @xmath7 .
we assume that @xmath6 takes values in @xmath8 , and that @xmath9 is measurable for each @xmath10 $ ] .
moreover , we assume that @xmath11 , seen as a function on @xmath2 $ ] , is cadlag .
we write @xmath12 for the covariate- and treatment history until time @xmath7 , and @xmath13 for the space of cadlag functions from @xmath14 $ ] to @xmath8 in which @xmath15 takes it values .
similarly , we write @xmath16 for the whole covariate- and treatment history of the patient on the interval @xmath2 $ ] , and @xmath17 for the space in which @xmath16 takes its values . in this article
we choose the projection @xmath18-algebra as the @xmath18-algebra on @xmath13 and @xmath17 ; measurability of @xmath19 for each @xmath20 is then equivalent with measurability of the random variable @xmath15 . for technical reasons ,
we include in @xmath11 a counter of the number of jump times of the measured treatment- and covariate process .
we suppose that observations on different patients are independent .
structural nested models are models for relations between so - called counterfactuals . consider for a moment just one patient .
in reality this patient received a certain treatment and had final outcome @xmath1 . if his or her actual treatment had been stopped at time t , the patient s final outcome would possibly have been different .
the outcome he or she would have had in that case we call @xmath21 .
of course , @xmath21 is generally not observed , because the patient s actual treatment after @xmath7 is usually different from no treatment ; it is a counterfactual outcome . instead of stopping treatment
, one can also consider switching to some kind of baseline treatment , for example , standard treatment .
figure  [ figuur1 ] illustrates the nature of counterfactual outcomes .
we suppose that all counterfactual outcomes @xmath21 , for @xmath10 $ ] and for all patients , are random variables on the probability space @xmath4 .
to formalize the assumption of no unmeasured confounding , consider the history of a particular patient .
decisions of the doctors at time @xmath7 may be based , in part , on recorded information on the state of the patient and treatment before @xmath7 , that is , on @xmath22 , but not on other features predicting the outcome of the patient . in particular , given @xmath23 , changes of treatment at time @xmath7 should be independent of @xmath21 , the outcome of the patient in case he or she would not have been treated after time @xmath7 , given @xmath23 .
note that @xmath21 is an indication of the prognosis of the patient which does not depend on treatment decisions at or after time @xmath7 , since it is the counterfactual outcome which we would have observed if treatment would have been stopped at time  @xmath7 . only if treatment would have no effect , the observed outcome @xmath1 could play this role .
this is why robins assumption of no unmeasured confounding demands the independence , given @xmath23 , of treatment decisions at time @xmath7 and @xmath21 .
similar conditions , though without time - dependence , can be found in , for example , @xcite .
the statement `` changes of treatment at @xmath7 should be independent of @xmath21 , the outcome of the patient in case he or she would not have been treated after time @xmath7 , given @xmath23 '' is not a formal statement : it includes conditioning of null events ( since the probability that treatment changes at @xmath7 may be @xmath24 for every fixed @xmath7 ) on null events ( @xmath23 ) .    to overcome this difficulty , we assume that the treatment process can be represented by or generates a ( possibly multivariate ) counting process @xmath25 .
for instance , @xmath26 registers the number of treatment changes until time @xmath7 and/or the number of times treatment reached a certain level until time @xmath7 .
a counting process constructed this way may serve as @xmath25 in the following . more about counting processes can be found in , for example , andersen et al .
( @xcite ) .
we assume that the treatment process @xmath25 has an intensity process .
formally , such an intensity process @xmath27 is a predictable process such that @xmath28 is a martingale .
the intensity @xmath27 with respect to @xmath29 can be interpreted as the rate at which the counting process @xmath25 jumps given the past treatment- and covariate history @xmath23 .
[ int ] @xmath25 has an intensity process @xmath27 on @xmath2 $ ] with respect to the filtration @xmath29 .
this intensity process satisfies the following regularity conditions :    @xmath30 is bounded by a constant which does not depend on @xmath31 ,    @xmath27 is continuous from the left .    according to this assumption , @xmath32 is a martingale on @xmath2 $ ] with respect to the filtration @xmath29 . since most counting process martingale theory deals with filtrations
@xmath33 which satisfy the usual conditions ( @xmath34 contains all null sets and @xmath35 ) , we mention that , under , @xmath36 is also a martingale with respect to @xmath37 , the usual augmentation of @xmath29 .
this follows from lemma  67.10 in @xcite , since @xmath38 is cadlag .
often , @xmath25 will be chosen to count the number of events of a certain type concerning the treatment process ( e.g. , the number of times treatment changed ) . at  @xmath3 ,
the time the study ends , treatment is stopped or switched to baseline treatment , so a natural choice of @xmath25 will often jump at @xmath3 with positive probability .
however , jumps of @xmath25 at @xmath3 are not useful for estimation , and we wish to avoid modeling jumps of @xmath25 at @xmath3 .
therefore , we assume that , with probability @xmath39 , @xmath25 does not jump at @xmath3 , and if a natural choice of @xmath25 _ does _ jump at @xmath3 with positive probability , then we just adapt it , only at @xmath3 , so that it does not jump there .
we also make the following assumption .
[ ycadlag ] @xmath40 is a cadlag process .    within this framework
, the assumption of no unmeasured confounding could be operationalized as follows
. the rate at which the counting process @xmath25 jumps given past treatment- and covariate history is also the rate at which @xmath25 jumps given past treatment- and covariate history and @xmath41 .
that is , the following :    [ intconf ] the intensity process @xmath27 of @xmath25 with respect to @xmath29 is also an intensity process of @xmath25 with respect to @xmath42 .
this can be interpreted as conditional independence ( given @xmath23 ) of treatment decisions at time @xmath7 and @xmath43 .
this assumption is stronger than just conditional independence of treatment decisions at @xmath7 and @xmath21 as assumed in robins ( @xcite ) .
however , also @xmath44 for @xmath45 is an indication of the patient s prognosis upon which treatment decisions at time @xmath7 ( @xmath46 ) should not depend .
assumption  [ intconf ] allows us to use the usual counting processes framework . under assumption  [ intconf ]
, @xmath47}\lambda(s)\ , ds$ ] is a martingale also with respect to @xmath42 and its usual augmentation @xmath48 .
this formalization of the assumption of no unmeasured confounding in terms of compensators with respect to the filtration @xmath42 is a novel feature of this paper relative to the previous literature on structural nested models .
robins et al .
( @xcite ) , @xcite and @xcite use a cox model for initiation and/or changes in treatment .
however , none of them formalized the assumption of no unmeasured confounders in terms of compensators with respect to @xmath42 . as a consequence
, they could not use the extensive theory on counting process martingales to show the asymptotics of their estimators , which then remained without proof .
structural nested models in continuous time model distributional relations between @xmath21 and @xmath49 , for @xmath50 small , through a so - called infinitesimal shift - function @xmath51 .
write @xmath52 for the cumulative distribution function and @xmath53 for its generalized inverse @xmath54 then the infinitesimal shift - function @xmath51 is defined as @xmath55 the ( right - hand ) derivative of the quantile  quantile transform which moves quantiles of the distribution of @xmath21 to quantiles of the distribution of @xmath49 ( @xmath56 ) , given the covariate- and treatment history until time @xmath7 , @xmath15 .
notice that for differentiability of @xmath57 with respect to @xmath58 we need that a short duration of treatment has only a small effect on the distribution of the outcome of interest ( see page  3 , second paragraph ) , since @xmath59 must be equal to @xmath60 .
[ daexa ] robins , blevins , ritter and wulfsohn ( @xcite ) describe an aids clinical trial to study the effect of azt treatment on survival in hiv - infected subjects . embedded within this trial was an essentially uncontrolled observational study of the effect of prophylaxis therapy for pcp on survival .
pcp , pneumocystis carinii pneumonia , is an opportunistic infection that afflicts aids patients .
the aim of robins et al .
( @xcite ) was to study the effect of this prophylaxis therapy on survival .
thus , the outcome of interest @xmath1 is the survival time , and the treatment under study is prophylaxis for pcp .
once treatment with prophylaxis for pcp started , it was never stopped .
suppose that @xmath61 then ( see section  [ cmim ] for details ) , for @xmath62 , withholding treatment from @xmath7 onward leads to ( with @xmath63 meaning `` is distributed as '' ) @xmath64\\[-8pt ] & = & e^{\psi}\cdot \mathit{dur}(t , y)+1\cdot \bigl(y - t-\mathit{dur}(t , y)\bigr)\qquad \mbox{given } \overline{z}_t,\nonumber\end{aligned}\ ] ] with @xmath65 the duration of treatment in the interval @xmath66 .
thus , treated residual survival time ( @xmath7 until @xmath1 ) is multiplied by @xmath67 by withholding treatment ; compare this with accelerated failure time models , see , for example , @xcite .
this multiplication factor @xmath67 should be interpreted in a distributional way .
one of the models studied in robins et al .
( @xcite ) assumes that ( [ dasim ] ) is true even with @xmath63 replaced by @xmath68 ( though only for @xmath69 ) .
notice that supposing ( [ dasim ] ) to be true with @xmath63 replaced by @xmath68 would be much stronger .
[ daexa2 ] consider the situation from example  [ daexa ] again . in another model mentioned in robins , blevins ,
ritter and wulfsohn ( @xcite ) the factor with which treated residual survival time is multiplied when treatment is withheld can depend on the azt treatment the patient received and whether or not the patient had a history of pcp prior to start of pcp prophylaxis .
since this was a clinical trial for azt treatment , the azt treatment was described by a single variable @xmath70 indicating the treatment arm the patient was randomized to ( @xmath70 is @xmath24 or @xmath39 ) . whether or not the patient had a pcp history prior to start of prophylaxis
is described by an indicator variable @xmath71 .
@xmath71 equals @xmath39 if the patient had pcp before or at @xmath7 _ and _ before prophylaxis treatment started ; otherwise @xmath71 equals @xmath24 . if @xmath72 then ( see section  [ cmim ] for details ) withholding prophylaxis treatment from @xmath7 onward leads to @xmath73 for @xmath62 .    [ prior ] following @xcite , again consider survival as the outcome of interest .
suppose that it is known that treatment received at time @xmath7 only affects survival for patients destined to die by time @xmath74 if they would receive no further treatment .
an example would be a setting in which failure is death from an infectious disease , the treatment is a preventive antibiotic treatment which is of no benefit unless the subject is already infected and , if death occurs , it always does within five weeks from the time of initial unrecorded subclinical infection . in that case , as remarked in @xcite , the natural restriction on @xmath51 is that @xmath75    more biostatistical examples of models for @xmath51 can be found in , for example , @xcite , witteman et al .
( @xcite ) , @xcite and keiding et al .
( @xcite ) .
@xmath76 can be interpreted as the infinitesimal effect on the outcome @xmath1 of the treatment actually given in the time - interval @xmath77 ( relative to baseline treatment ) . to be more precise , from the definition of @xmath51 we have @xmath78 in figure  [ dfig
] this is sketched .
@xmath79 in the picture is the @xmath80th quantile of the distribution of @xmath21 given @xmath15 . for @xmath50 , the @xmath80th quantile of the distribution of @xmath49 given
@xmath15 is @xmath81 .
thus , to shift from quantiles of the distribution of @xmath21 to the distribution of @xmath49 given @xmath15 ( @xmath50 ) is approximately the same as to just add @xmath82 to those quantiles .
for example , if @xmath83 lies to the right of @xmath84 for @xmath50 , then treatment between @xmath7 and @xmath85 increases the outcome ( in distribution ) , and @xmath86 is greater than @xmath24 .    .
]    consider again this interpretation of @xmath51 as the infinitesimal effect of treatment given in @xmath77 .
if the outcome of interest is survival , then @xmath76 should be zero if @xmath15 indicates the patient is dead at time @xmath7 .
indeed , in that case @xmath83 and @xmath84 should be almost surely the same for every @xmath56 , since withholding treatment after death does not change the survival time .
thus , @xmath87 is constant in @xmath58 for @xmath56 and , therefore , @xmath88 .
however , this reasoning is not precise because of the complication of null sets .
we will therefore just formally define @xmath76 to be zero if the outcome of interest is survival and @xmath15 indicates the patient is dead at time @xmath7 .    it can be shown that @xmath89 if treatment does not affect the outcome of interest , as was conjectured in @xcite . to be more precise
, @xcite shows that , for example , @xmath89 if and only if , for every @xmath50 and @xmath7 , @xmath49 has the same distribution as @xmath21 given @xmath15 .
that is , @xmath89 if and only if `` at any time @xmath7 , whatever patient characteristics are selected at that time ( @xmath15 ) , stopping ` treatment as given ' at some fixed time after @xmath7 would not change the distribution of the outcome in patients with these patient characteristics . ''    in the rest of this article @xmath90 will always indicate a correctly specified parametric model for @xmath51 , with @xmath89 if @xmath91 .
define @xmath92 as the continuous solution to the differential equation @xmath93 with final condition @xmath94 , the observed outcome ( see figure  [ dtfig ] ) .
then @xmath92 mimics @xmath21 in the sense that it has the same distribution as @xmath21 given @xmath15 .
this rather surprising result was conjectured in @xcite and proved in lok ( @xcite ) . to prove this result , we need the following consistency assumption .     to the differential equation @xmath95 with final condition @xmath94 in case
the outcome is survival time . ]
[ inst ] @xmath96 has the same distribution as @xmath1 given  @xmath97 .
notice that since by assumption no treatment was given after time @xmath3 and since treatment is right - continuous , there is no difference in treatment between @xmath96 and  @xmath1 .
we suppose that this assumption holds , and we also suppose that a short duration of treatment has only a small effect on the distribution of the outcome of interest ( @xmath98 ) . under these assumptions and regularity conditions only ,
lok ( @xcite ) proved that indeed equation ( [ xdef ] ) has a unique solution for every @xmath99 , and that this solution @xmath92 mimics @xmath21 in the sense that @xmath92 has the same distribution as @xmath21 given @xmath15 ( see appendix  [ xtap ] ) . throughout this article
we will assume that this result holds true .
[ daexai ] survival of aids patients ( continuation of example  ) .
suppose that @xmath100 then @xmath101 if @xmath102 , and @xmath103 for @xmath104 .
suppose now that one has a correctly specified parametric model for the infinitesimal shift - function @xmath51 , @xmath90 .
then one can calculate `` @xmath105 , '' the solution to @xmath106 with final condition @xmath107 . for the true @xmath108
, @xmath105 has the same distribution as @xmath21 , the outcome with treatment stopped at @xmath7 , even given all patient - information at time @xmath7 , @xmath15 .
so instead of the unobservable @xmath21 s , we have the observable @xmath109 s which for the true @xmath108 mimic the @xmath21 s .
although we do not know the true @xmath108 , this result turns out to be very useful , both for estimating @xmath108 ( sections  [ ees ] and  [ asnorm ] ) and for testing [ section  [ test ] ; notice that when testing whether treatment affects the outcome ( i.e. , whether @xmath89 ) , @xmath110 can simply be calculated from the data ( @xmath111 ) under the null hypothesis of no treatment effect ] .      in this appendix
we present conditions under which @xmath92 mimics @xmath21 in the sense that it has the same distribution as @xmath21 given @xmath15 .
this result is used heavily in this article . for
the proofs , which are lengthy and use discretization , we refer to lok ( @xcite ) . section  [ xtapt ] deals with survival outcomes , section  [ xtapy ] with other outcomes .
survival outcomes require a different set of assumptions , as will become clear below .
the conditions here are somewhat more restrictive than the ones in lok ( @xcite ) , but they are simpler .
this section contains a sufficient set of regularity conditions to have existence and uniqueness of a solution @xmath92 to ( [ xdef ] ) , @xmath507 with final condition @xmath94 , the observed outcome ( see figure  [ dtfig ] ) .
furthermore , together with assumption  [ inst ] ( consistency ) , they imply that @xmath92 has the same distribution as @xmath21 given @xmath15 .
the regularity conditions below should be read as the following : there exist conditional distribution functions @xmath83 such that all these assumptions are satisfied .
they can be relaxed to @xmath58 in a neighborhood of @xmath24 , if this neighborhood does not depend on @xmath16 .
we only consider @xmath56 , so the derivative with respect to @xmath58 at @xmath508 is always the right - hand derivative .
[ sup ]    ( _ support _ ) .
there exist finite numbers @xmath509 and @xmath510 such that all @xmath83 have the same bounded support @xmath511 $ ] .
all @xmath512 have a continuous nonzero density @xmath513 on @xmath514 $ ] .
there exists an @xmath216 such that @xmath515 for all @xmath514 $ ] , @xmath99 and @xmath10 $ ] .
( _ smoothness _ ) . for every @xmath99 ,    @xmath516 is differentiable with respect to @xmath7 , @xmath79 and @xmath58 with continuous derivatives on @xmath511\times[t_1,t_2)\times { \mathbb r}$ ] if @xmath11 does not jump in @xmath239 , with a continuous extension to @xmath511\times[t_1,t_2]\times [ 0,\infty)$ ] .
the derivatives of @xmath512 with respect to @xmath79 and @xmath58 are bounded by constants @xmath315 and @xmath317 , respectively .
@xmath517 and @xmath518 have derivatives with respect to @xmath79 which are bounded by constants @xmath519 and @xmath520 , respectively .
the support conditions may be restrictive for certain applications .
nevertheless , most real - life situations can be approximated this way , since @xmath509 and @xmath510 are unrestricted and @xmath216 is unrestricted , too .
although the support conditions may well be stronger than necessary , they simplify the analysis considerably and , for that reason , they are adopted here .
the smoothness conditions allow for nonsmoothness where the covariate- and treatment process @xmath11 jumps .
this is important , since if the covariate- and treatment process @xmath11 jumps , this can lead to a different prognosis for the patient and thus to nonsmoothness of the functions concerned .
[ thm1 ] suppose that regularity condition   is satisfied
. then @xmath76 exists .
furthermore , for every @xmath99 , there exists exactly one continuous solution @xmath92 to @xmath95 with final condition @xmath94 .
if also assumption   ( consistency ) is satisfied and there are no more than finitely many times @xmath7 for which the probability that the covariate- and treatment process jumps at @xmath7 is greater than @xmath24 , then this @xmath92 has the same distribution as @xmath21 given @xmath15 for all @xmath10 $ ] .    for a proof we refer to lok ( @xcite ) .
this section contains a sufficient set of regularity conditions to have existence and uniqueness of a solution @xmath92 to equation  ( [ xdef ] ) , @xmath95 with final condition @xmath94 , the observed outcome ( see figure  [ dtfig ] ) .
furthermore , together with assumption  [ inst ] ( consistency ) and assumptions  [ ttcons ] and  [ ttinst ] below , they imply that @xmath92 has the same distribution as @xmath21 given @xmath15 .
the conditions here are natural conditions if the outcome of interest @xmath1 is a survival time .    as compared to section  [ xtapy ] , we make two extra assumptions .
the first is a consistency assumption , stating that stopping treatment after death does not change the survival time .
the second assumption states that there is no instantaneous effect of treatment at the time the patient died [ notice that the difference between @xmath521 , the outcome with treatment stopped at the survival time @xmath1 , and @xmath1 is in treatment _ at _ @xmath1 ] .    [ ttcons ] @xmath523 on @xmath524 .
[ ttinst ] @xmath525    under these assumptions , treatment in the future does not cause or prevent death at present or before :    [ conslem ] under assumptions   and  :    for all @xmath56 : @xmath526 on @xmath527 .
for all @xmath528 with @xmath529 and @xmath530 .    for a proof
we refer to @xcite .
if the outcome is survival , the support condition in assumption  [ xtapy ] , saying that all @xmath83 have the same bounded support @xmath511 $ ] , will not hold .
the reason for this is as follows .
@xmath15 includes the covariate - measurements and treatment until time @xmath7 .
if covariates and treatment were measured at time @xmath7 , it can not be avoided to include in @xmath15 whether or not a patient was alive at time @xmath7 . given
that a patient is dead at time  @xmath7 and given his or her survival time , the distribution of this survival time can not have the fixed support @xmath511 $ ] , which is independent of @xmath7 .
also , given that a patient is alive at time @xmath7 , this is hardly ever the case ; one often expects that @xmath7 is the left limit of the support .
thus , in case the outcome is survival , the support condition for theorem  [ thm1 ] has to be slightly changed .
[ tsup ] there exists a finite number @xmath531 such that :    for every @xmath99 and @xmath7 with @xmath102 , all @xmath83 for @xmath56 have support @xmath532 $ ] .    for every @xmath99 and @xmath7 with @xmath102 , all @xmath512 for @xmath56 have a continuous nonzero density @xmath513 on @xmath533 $ ] .
there exists a number @xmath216 such that , for all @xmath99 and @xmath7 with @xmath102 , @xmath534 for @xmath535 $ ] .
next we look at the differentiability conditions in assumption  [ sup ]
. it does not seem reasonable to assume that @xmath512 is continuously differentiable with respect to @xmath58 and @xmath79 on @xmath536 $ ] since , for @xmath529 , @xmath537 [ lemma  [ conslem](b ) ] .
therefore , the derivative of @xmath512 with respect to @xmath58 is likely not to exist at @xmath538 ( and is equal to zero for @xmath539 ) .
also , the derivative of @xmath512 with respect to @xmath79 may not exist at @xmath538 , because of the different treatment before and after @xmath85 .
for survival outcomes , we replace the smoothness conditions of assumption [ sup ] by the following :    [ tsmooth ] for every @xmath99 :    if @xmath11 does not jump in @xmath239 and @xmath540 , the restriction of @xmath541 to @xmath542\times[t_1,t_2)\times { \mathbb r}_{\geq 0}\dvtx y\geq t+h\}$ ] is @xmath543 in @xmath528 .
the derivatives of @xmath512 with respect to @xmath79 and @xmath58 are bounded by constants @xmath315 and @xmath317 , respectively , for @xmath533 $ ] .
@xmath517 and @xmath518 have derivatives with respect to @xmath79 which are bounded by constants @xmath519 and @xmath520 , respectively , for @xmath533 $ ] .
the smoothness condition above concentrates on @xmath544 . for @xmath545 we can choose @xmath537 because of lemma  [ conslem](b ) .
because of assumption  [ inst ] ( consistency ) , @xmath546 has the same support as @xmath547 , so @xmath546 has support @xmath532 $ ] if @xmath102 [ assumption  [ tsup](a ) ] .
assume the following    [ ytsup ] for all @xmath99 and @xmath7 with @xmath102 , @xmath548 is continuous and strictly increasing on its support @xmath532 $ ] .
[ tthm1 ] suppose that regularity conditions and   are satisfied .
then @xmath76 exists .
furthermore , for every @xmath99 , there exists exactly one continuous solution @xmath92 to @xmath95 with final condition @xmath94 .
if also assumptions   and   ( consistency and no instantaneous treatment effect at time of death ) are satisfied , then this @xmath92 has the same distribution as @xmath21 given @xmath15 for all @xmath10 $ ] .    for a proof we refer to lok ( @xcite ) .
previous applications of structural nested models [ see , e.g. , robins et al . ( @xcite ) , @xcite ( @xcite ) , witteman et al .
( @xcite ) and keiding et al .
( @xcite ) ] have assumed the so - called local rank preservation condition .
local rank preservation states that @xmath21 is a local solution to ( [ xdef ] ) .
however , if @xmath21 is locally a solution to ( [ xdef ] ) , it is usually also globally a solution to ( [ xdef ] ) ; see , for example , theorem  [ isun ] in the .
hence , if one knew the parameter @xmath108 , every @xmath21 would be a deterministic function of the observed data .
deterministic dependence of counterfactuals on the observed data is a very strong condition , which , though untestable , is generally considered implausible . the previous literature [ see , e.g. , @xcite ( @xcite ) , robins et al . ( @xcite ) , @xcite ( @xcite ) and keiding et al .
( @xcite ) ] acknowledged this problem , and conjectured that the assumption of local rank preservation could be relaxed in continuous time [ since it is known that the assumption of local rank preservation can be relaxed for structural nested models in discrete time ; this was pointed out by @xcite ( @xcite ) , and lok et al .
( @xcite ) provided a proof ] .
see @xcite for a more elaborate discussion .
the following example describes a setting where the assumption of local rank preservation is implausible .
in the situation of example  [ daexa ] , consider the following thought experiment .
suppose that two patients had the same covariate history until time @xmath7 , and both received the same constant treatment to prevent pcp until time @xmath7 ( equal @xmath15 ) .
suppose , furthermore , that both patients received no treatment after time @xmath7 , that they did not have pcp before time @xmath7 and both died at the same time @xmath112 ( for both , @xmath113 ) .
possibly , the first patient would have had pcp at some time @xmath45 and would have died from it before @xmath114 in case he or she would not have been treated .
possibly , the other patient would not have had pcp in case he or she would not have been treated , and would have died at the same time @xmath112 as without treatment .
thus , it is easy to imagine that these patients would have had different outcomes under no treatment ( different @xmath115 ) .
however , the assumption of local rank preservation excludes this possibility .
local rank preservation is a very strong condition , for which structural nested models have previously been attacked .
in fact , this article shows that the assumption of local rank preservation is not needed for structural nested models .
however , proofs would be much easier under rank preservation ; for details , see the remarks before the proofs of theorems  [ thec ] and  [ mgc ] .
see also @xcite for a more informal reasoning .
to estimate the infinitesimal shift - function @xmath51 , @xcite proposes to use a ( semi-)parametric model to predict future treatment ( @xmath25 in our case ) on the basis of past treatment- and covariate history @xmath23 .
this may seem odd , since prediction of treatment is not what we are interested in .
however , we will show that such a model to predict treatment changes can indeed be a tool to get unbiased estimating equations for the parameter @xmath108 in the model for @xmath51 . moreover ,
often doctors may have a better understanding , at least qualitatively , about how decisions about treatment were made than about the effect of the treatment . in what follows
we will assume that @xmath116 is a correctly specified parametric model for the intensity @xmath30 of @xmath25 .
recall from section  [ nounsec ] that , under no unmeasured confounding ( assumption  [ intconf ] ) , @xmath21 does not contain information about treatment changes given past treatment- and covariate history @xmath23 . since @xmath92 has the same distribution as @xmath21 given @xmath15 , one could expect that also @xmath92 does not contain information about treatment changes given @xmath23 .
unfortunately , this reasoning is not precise : we have to somehow deal with null sets since the probability that treatment changes at @xmath7 given past covariate- and treatment history is often equal to @xmath24 for each @xmath7 . in section  [ mgs ]
we will show how this can be dealt with .    in the current section we present a class of unbiased estimating equations for @xmath117 and @xmath108 .
these will be used for the proof in the next section , but they are also of interest in their own . in section  [ mgs ] we will see that these estimating equations are in fact martingales , for the true parameters @xmath118 and @xmath119 .
recall from section  [ nounsec ] that , under no unmeasured confounding , we have the martingale @xmath47}\lambda(s)\,ds$ ] with respect to the filtration @xmath42 and its usual augmentation . from this martingale
we can construct a whole family of martingales . if @xmath120 is a @xmath48-predictable process , then , under regularity conditions , @xmath121 is a martingale with respect to @xmath48 . for a more formal statement , we first make sure that @xmath120 is predictable .
we put the following restriction on the functions @xmath122 we consider here :    [ hreg ] when in this section we consider functions @xmath122 from @xmath123 , we assume that they are measurable and satisfy the following :    @xmath122 is bounded by a constant which does not depend on @xmath7 and @xmath16 ,    for all @xmath124 $ ] , @xmath125 and @xmath99 , @xmath126 when @xmath127 and @xmath128 .    for such @xmath122
, @xmath120 is a @xmath48-predictable process :    [ hpred ] suppose that @xmath40 is cadlag assumption
. then @xmath129 is a @xmath48-predictable process for any @xmath122 satisfying restriction  .
proof @xmath120 is adapted .
it is also left - continuous : because @xmath40 is cadlag , @xmath130 exists .
thus , we come to the following lemma :    [ lemec ] under assumptions  bounded intensity process @xmath40 cadlag and  [ intconf ] ( no unmeasured confounding ) , @xmath131 is a martingale on @xmath2 $ ] with respect to @xmath48 for all @xmath122 satisfying restriction  .
proof @xmath132 is a martingale on @xmath2 $ ] with respect to @xmath48 , because of assumption  [ intconf ] .
it is of integrable variation . because of lemma  [ hpred ]
, @xmath133 is a @xmath48-predictable process .
it is also bounded [ restriction  [ hreg](a ) ] .
hence,@xmath134 is an integral of a bounded predictable process with respect to a martingale of integrable variation , and , therefore , a  @xmath48-martingale .    to construct unbiased estimating equations for @xmath135
, we need to assume that the probability that @xmath136 and @xmath40 jump at the same time is zero .
this assumption is a formalization of the assumption of no instantaneous treatment effect as proposed in @xcite , which can be seen as follows . given @xmath23 and @xmath137
, @xmath25 jumps at @xmath7 with rate @xmath27 ( assumption  [ intconf ] , no unmeasured confounding ) .
@xmath40 is a cadlag process ( assumption  [ ycadlag ] ) , which thus for every @xmath99 jumps at most countably many times on the finite time interval @xmath2 $ ] .
therefore , if @xmath40 and @xmath25 would jump at the same time with positive probability , this would imply a dependence of these jumps ; the obvious interpretation of this dependence would be that a change of treatment instantaneously affects the outcome of interest .
[ jump ] the probability that there exists a @xmath7 such that @xmath136 and @xmath40 both jump at time @xmath7 is @xmath24 .
notice that this excludes estimation of the effect of point exposures .
for example , if treatment is surgery or another point exposure given at some time @xmath7 , the outcome under `` treatment stopped at time @xmath7 '' will typically jump at time @xmath7 if treatment affects the outcome of interest , at the same time as the treatment itself .
however , this assumption does not exclude the possibility that the outcome differs depending on whether a patient is treated or not at a certain point in time .
for example , @xmath138 and @xmath139 may be different when a virus is contacted at time @xmath7 .
the model in this article can accommodate differences between @xmath138 and @xmath139 , as long as the probability that the observed treatment changes is @xmath24 at that precise time . or , in more generality , as long as the probability that @xmath25 jumps at the same time is @xmath24 .
this was previously noticed in @xcite , section  8 .
the estimating procedures in this article do not deal with instantaneous treatment effects .
suppose that the above conditions hold and that @xmath140 for @xmath10 $ ] ( see section  [ cmim ] )
. then if @xmath141 and @xmath116 are correctly specified ( parametric ) models for @xmath51 and @xmath30 , respectively , each choice of @xmath122 satisfying restriction  [ hreg ] leads to an unbiased estimating equation for both the parameter of interest @xmath108 and the ( nuisance ) parameter @xmath117 :    [ thec ] suppose that assumptions  bounded intensity process@xmath40 cadlag ( no unmeasured confounding ) and   ( no instantaneous treatment effect ) are satisfied .
suppose also that , for every @xmath10 $ ] , @xmath92 has the same distribution as @xmath21 given @xmath15 .
then @xmath142 for each @xmath122 satisfying restriction  .
thus , if @xmath90 and @xmath116 are correctly specified parametric models for @xmath51 and @xmath30 , respectively , @xmath143 with @xmath144 the empirical measure @xmath145 , is an unbiased estimating equation for @xmath146 , for each @xmath122 satisfying restriction  .
@xmath122 here is allowed to depend on @xmath108 and @xmath117 , as long as it satisfies restriction   for @xmath146 .    as before ,
@xmath109 here is the continuous solution of ( [ xpsi ] ) , @xmath147 with boundary condition @xmath107 .
moreover , as before , we assume that for all @xmath90 we have existence and uniqueness of such solutions ; theorem  [ isun ] in the appendix provides sufficient conditions for that .    under local rank preservation ( see section  [ loc ] ) ,
@xmath148 for each @xmath7 . in that case theorem  [ thec ] follows immediately from lemma  [ lemec ] .
however , as argued in section  [ loc ] , local rank preservation is generally considered implausible .
proof of theorem [ thec ] we have to show that @xmath149 has expectation zero for all @xmath122 satisfying restriction  [ hreg ] . to do that , we prove that it has the same expectation as @xmath150 which has expectation zero because of lemma  [ lemec ] .
we will first show that the terms with @xmath151 have the same expectation , that is , @xmath152 after that we show that the terms with @xmath153 have the same expectation , that is , @xmath154 as we will see below , ( [ firste ] ) and ( [ seconde ] ) have to be proved separately , since we do not have or expect that @xmath155 for @xmath45 ; we only have this for @xmath156 .
therefore , the approximations below have to be chosen carefully .
at first we prove ( [ firste ] ) , by approximating these sums and showing that the approximations have the same expectation .
next we show that the approximations converge and that ( [ firste ] ) follows with lebesgue s dominated convergence theorem .
define @xmath157 , @xmath158 , etc .
, the jump times of the counting process @xmath25 in the interval @xmath2 $ ] .
they are measurable [ e.g. , because of @xcite ( @xcite ) , lemma  74.4 ] .
note that the number of jumps in @xmath2 $ ] is almost surely finite because @xmath25 is integrable ( it has a bounded intensity process ) . in the
following read @xmath159 if there is no @xmath160th jump of @xmath25 in the interval @xmath2 $ ] .
next split up the interval @xmath2 $ ] in intervals of equal length : for @xmath161 fixed , put @xmath162 , @xmath163 .
fix @xmath164 for the moment .
the right - hand side of equation  ( [ firste ] ) is harder to approximate than the left - hand side , both because @xmath21 does not need to be continuous in @xmath7 while @xmath92 does and because knowing @xmath21 and @xmath15 does not imply knowing @xmath44 for @xmath45 and we do not have or expect @xmath155 for @xmath45 .
the approximations we choose are @xmath165\\[-8pt ] \qquad & \approx & \sum_{j=1}^\infty\sum_{k=0}^{k-1 } 1_{(\tau_k,\tau_{k+1}]}(t_j ) h_{\tau_{k}}\bigl(y^{(\tau_{k+1})},\overline{z}_{\tau_{k}-}\bigr)\nonumber\end{aligned}\ ] ] and @xmath166\\[-8pt ] \qquad & \approx & \sum_{j=1}^\infty\sum_{k=0}^{k-1 } 1_{(\tau_k,\tau_{k+1}]}(t_j ) h_{\tau_{k}}\bigl(x(\tau_{k+1}),\overline{z}_{\tau_{k}-}\bigr).\nonumber\end{aligned}\ ] ]    to show that these approximations have the same expectation , we use that @xmath167 . therefore ,
also @xmath168}(t_j ) h_{\tau_{k}}(x(\tau_{k+1}),\overline{z}_{\tau_{k-}})\sim 1_{(\tau_k,\tau_{k+1}]}(t_j ) h_{\tau_{k}}\bigl(y^{(\tau_{k+1})},\overline{z}_{\tau_{k-}}\bigr)\ ] ] [ notice that @xmath169}(t_j)$ ] is a function of @xmath170 .
hence , the expectation of each of the terms on the right - hand side of ( [ apy ] ) is equal to the expectation of the corresponding term on the right - hand side of ( [ apx ] ) .
since @xmath122 is bounded [ restriction  [ hreg](a ) ] and the expected number of jump times @xmath171 is finite ( @xmath25 is integrable ) , this implies that the expectation of the right hand - side of equation  ( [ apy ] ) is equal to the expectation of the right - hand side of equation  ( [ apx ] ) .
equation  ( [ firste ] ) follows if the expectation of the approximations in ( [ apy ] ) and ( [ apx ] ) converges to the right - hand side and left - hand side of equation  ( [ firste ] ) , respectively .
this convergence is harder to show for ( [ apy ] ) than for ( [ apx ] ) , since @xmath40 may jump [ while @xmath172 does not , by construction ] .
fix @xmath160 for a moment . define @xmath173 and @xmath174 as the grid points such that @xmath175 $ ] .
as @xmath176 , @xmath177 , so that since @xmath178 is cadlag , @xmath179 . moreover , as @xmath180 , @xmath181 , so that because of restriction  [ hreg ] on @xmath58 , @xmath182
. combining this for all @xmath160 leads to @xmath183}(t_j ) h_{\tau_{k}}\bigl(y^{(\tau_{k+1})},\overline{z}_{\tau_{k-}}\bigr ) \rightarrow \sum_{j=1}^\infty h_{t_j}\bigl(y^{(t_{j})},\overline{z}_{t_j-}\bigr)\ ] ] as @xmath184 for every @xmath31 for which the number of jumps of @xmath25 is finite , so for almost every @xmath99 .
@xmath122 is bounded [ restriction  [ hreg](a ) ] and the left - hand side is bounded by the number of jumps of @xmath25 times this bound .
the expectation of that is finite because @xmath25 is integrable .
thus , lebesgue s dominated convergence theorem can be applied , and @xmath185}(t_j ) h_{\tau_{k}}\bigl(y^{(\tau_{k+1})},\overline{z}_{\tau_{k}-}\bigr)\biggr ) \rightarrow e\biggl(\sum_{j=1}^\infty h_{t_{j}}\bigl(y^{(t_{j})},\overline{z}_{t_j-}\bigr)\biggr)\ ] ] as @xmath184 . because with probability one @xmath40 and @xmath25 do not jump at the same time ( assumption  [ jump ] of no instantaneous treatment effect ) , @xmath186 so that we can replace @xmath187 by @xmath188 on the right - hand side of ( [ naarplus ] ) .
therefore , indeed , the expectation of the approximation in ( [ apy ] ) converges to the expectation of the left - hand side of ( [ apy ] ) .
the same reasoning shows this for ( [ apx ] ) . here
less caution is necessary since @xmath92 is continuous in @xmath7 . that concludes the proof of equation  ( [ firste ] ) .
next we prove ( [ seconde ] ) , also by approximation . here , too , we show that the approximations have the same expectation and that ( [ seconde ] ) follows with lebesgue s dominated convergence theorem .
divide the interval @xmath2 $ ] as above .
the approximations we choose here are @xmath189 and @xmath190 because @xmath191 and @xmath192 are a measurable function of @xmath193 ( assumption  [ int ] , bounded intensity process ) , the expectation of each of the terms in ( [ apy2 ] ) is equal to the expectation of the corresponding term in ( [ apx2 ] ) .
thus , the expectations of these approximations are equal .
equation  ( [ seconde ] ) follows if the expectation of the approximations in  ( [ apy2 ] ) and  ( [ apx2 ] ) converge to the right - hand side and left - hand side of equation  ( [ seconde ] ) , respectively .
this convergence is also harder to show for ( [ apy2 ] ) than for ( [ apx2 ] ) because of possible discontinuities of @xmath40 .
first notice that as @xmath184 , for @xmath7 fixed , @xmath194}(t ) h_{\tau_k}\bigl(y^{(\tau_k)},\overline{z}_{\tau_k-}\bigr ) \lambda(\tau_k)\rightarrow h_{t}\bigl(y^{(t-)},\overline{z}_{t-}\bigr ) \lambda(t)\ ] ] for every @xmath99 fixed and for every @xmath195 : @xmath40 has limits from the left ( assumption  [ ycadlag ] ) , so that as @xmath196 , restriction  [ hreg](b ) on @xmath58 can be used , and @xmath30 is continuous from the left [ assumption  [ int](b ) ] .
taking integrals and applying lebesgue s dominated convergence theorem [ @xmath122 and @xmath30 are bounded because of restriction  [ hreg](a ) and assumption  [ int](a ) , resp .
] leads to @xmath197 for every @xmath99 . as both @xmath58 and @xmath30 are bounded , lebesgue s dominated convergence theorem guarantees that indeed the expectation of the approximation in ( [ apy2 ] ) converges to the expectation of the left - hand side of ( [ apy2 ] ) .
the same reasoning shows this for ( [ apx2 ] ) , which concludes the proof of equation  ( [ seconde ] ) and theorem  [ thec ] .
@xcite shows that if the rest of the conditions in this section are satisfied , assumption  [ jump ] ( treatment does not instantaneously affect the outcome of interest ) is a necessary condition for theorem  [ thec ] .
[ wei ] consider the setting of examples  [ daexa ] and  [ daexa2 ] and define @xmath198 if prophylaxis treatment started at or before time @xmath7 and @xmath24 otherwise .
suppose that initiation of prophylaxis treatment can be correctly modeled with the time - dependent weibull proportional hazards model @xmath199 where @xmath200 equals @xmath39 if the patient had pcp before time @xmath7 and @xmath24 otherwise , and @xmath201 and @xmath202 are greater than zero [ for more about the weibull proportional hazards model and its applications see , e.g. , @xcite ( @xcite ) ] .
if the patient died before @xmath7 or prophylaxis treatment already started before , the patient is not `` at risk '' for initiation of treatment and , thus , @xmath30 equals @xmath24 .
then the ( partial ) score equations for estimation of @xmath203 are @xmath204 such estimating equations can also be written down for the model including @xmath205 , @xmath206 @xcite proposes to estimate the parameters in a model like this by choosing those parameters @xmath207 which maximize the likelihood when @xmath208 is considered fixed and known , and for which @xmath209 : for the true @xmath108 , @xmath210 does not contribute to the model for treatment changes ( under no unmeasured confounding ) . to make the connection with the estimators in the current article ,
notice that this leads to the same estimators as the ones that solve the estimating equations arising from the likelihood when @xmath208 is considered fixed and known , with @xmath211 put to zero .
more precise , since we know that the true @xmath211 is equal to @xmath24 , we put @xmath211 equal to @xmath24 and get the estimating equations @xmath212 for the parameter @xmath108 ( and thus also for @xmath51 ) and the ( nuisance ) parameters @xmath203 .
these estimating equations are of the form of theorem  [ thec ] , @xmath213 but the function @xmath122 here is not bounded and @xmath30 need not be bounded ( if @xmath214 ) , so unbiasedness does not follow immediately from theorem  [ thec ] .
however , we could restrict the interval @xmath2 $ ] to @xmath215 $ ] for @xmath216 ( to assure that @xmath30 is bounded ) and @xmath217 can be approximated by the bounded functions @xmath218 ( @xmath219 ) ( to make @xmath122 bounded ) , which all lead to unbiased estimating equations because of theorem  [ thec ] .
the above estimating equations are then also unbiased because of lebesgue s dominated convergence theorem [ the dominating function is integrable since @xmath220 which is finite since @xmath221 .    under the model for @xmath51 of example  [ daexa ] , @xmath222
if the patient did not die before time @xmath7 . in that case
these are five unbiased estimating equations for five unknown parameters . if the parameter @xmath108 is of dimension greater than @xmath39 , more unbiased estimating equations can be constructed by adding more terms of the form @xmath223 .
we show that , under no unmeasured confounding , just as @xmath21 , @xmath92 does not predict treatment changes , given past treatment- and covariate history @xmath23 .
we could hope for that since @xmath224 given @xmath15 ( see section  [ cmim ] ) .
the formal statement is ( compare with assumption  [ intconf ] , no unmeasured confounding ) the following : the intensity process @xmath27 of @xmath25 with respect to @xmath29 is also the intensity process of @xmath25 with respect to @xmath225 .
then @xmath226 is also a martingale with respect to @xmath225 .
that will be useful later when we study the behavior of estimators @xmath227 and @xmath228 which are constructed with estimating equations of the form of theorem  [ thec ] , @xmath229 .
for example , we can use the fact that usually @xmath230}h(s)\,dm(s)$ ] is a martingale if @xmath38 is a martingale and @xmath231 a predictable process ; a sufficient condition for this is that @xmath232 .    before going on ,
we first clarify why @xmath233 is indeed a filtration .
for @xmath45 , @xmath234 is a deterministic ( though unknown ) function of @xmath235 ( i.e. , if solutions to the differential equation with @xmath51 are unique ; see , e.g. , theorem  [ isun ] in the ) .
similarly , for @xmath45 , @xmath92 is a deterministic function of @xmath236 .
in the rest of this article we will assume that these functions are measurable functions on @xmath237 ( sufficient conditions for that are that the infinitesimal shift - function @xmath51 satisfies regularity assumption  [ dreg ] below and that for each @xmath99 , @xmath11 only jumps finitely many times ; see appendix  [ smtb ] , lemma  [ mtb ] ) .
thus , @xmath238 we will use the filtration @xmath233 below , keeping in mind that it is indeed a filtration and satisfies equation  ( [ fil ] ) .    in the rest of this section we assume that the infinitesimal shift - function @xmath51 satisfies the following regularity condition :    [ dreg ]    ( _ continuity between the jump times of _
@xmath11 ) .
if @xmath11 does not jump in @xmath239 , then @xmath76 is continuous in @xmath240 on @xmath241 and can be continuously extended to @xmath242 $ ] .
( _ boundedness _ ) . for each @xmath99
, there exists a constant @xmath243 such that @xmath244 for all @xmath10 $ ] and all @xmath79 .
( _ lipschitz continuity _ ) . for each @xmath99
, there exist constants @xmath245 and @xmath246 with @xmath247 for all @xmath10 $ ] and all @xmath248 and @xmath249 if @xmath45 and @xmath11 does not jump in @xmath250 $ ] .
most regularity conditions on @xmath51 here are satisfied for the @xmath51 s from appendix  [ xtap ] [ see also lok ( @xcite ) ] .
only the second lipschitz condition is extra .
the lipschitz conditions are satisfied , for example , if , in between the jump times of @xmath11 , @xmath51 is continuously differentiable with respect to @xmath79 and @xmath7 with derivatives which are bounded for every fixed @xmath99 .
the next theorem states that @xmath38 is indeed also a martingale with respect to @xmath225 :    [ mgc ] suppose that the conditions of theorem   hold : assumptions   ( bounded intensity process ) , ( @xmath40 cadlag ) , ( no unmeasured confounding ) , ( no instantaneous treatment effect ) and for every @xmath10 $ ] , @xmath92 has the same distribution as @xmath21 given @xmath15 .
suppose , furthermore , that for each @xmath99 , @xmath11 jumps at most finitely many times , and that @xmath51 satisfies regularity condition  [ dreg ] .
then the intensity process @xmath27 of @xmath25 with respect to @xmath29 is also the intensity process of @xmath25 with respect to the filtration @xmath225 .
recall that in section  [ cmim ] we already mentioned that , under regularity conditions , @xmath92 mimics @xmath21 in the sense that it has the same distribution as @xmath21 given @xmath15 .    under local rank preservation (
see section  [ loc ] ) , @xmath148 for each @xmath7 . in that case theorem  [ mgc ] would be the same as the assumption of no unmeasured confounding  [ intconf ] .
however , as argued in section  [ loc ] , local rank preservation is generally considered implausible .
proof of theorem [ mgc ] because of assumption  [ int ] , @xmath251 is predictable with respect to @xmath29 , so then it is also predictable with respect to the larger filtration @xmath225 .
we still need to prove that @xmath38 is a martingale with respect to @xmath225 .
since a cadlag martingale with respect to some filtration is also a martingale with respect to its usual augmentation [ see @xcite ( @xcite ) , lemma  67.10 ] , it suffices to prove that @xmath38 is a martingale with respect to @xmath233 .
thus we need to prove that , for @xmath252 , @xmath253 = 0.\ ] ] this is not immediate , since we do not have or expect that @xmath254 if @xmath255 .    by the definition of conditional expectation ,
the above is the same as @xmath256 for all @xmath257 . because of theorem  34.1 in @xcite , it is sufficient to consider @xmath258 s forming a @xmath259-system generating @xmath260 .
with @xmath261 the @xmath18-algebra on @xmath262 , @xmath263 is such a @xmath259-system : it is closed under the formation of finite intersections and generates @xmath260 .
therefore , we only consider @xmath258 s of this form .
we prove ( [ enul ] ) for any @xmath264 .
let @xmath265 be any approximation of @xmath266 which is continuous for every fixed @xmath267 , with @xmath268 for every @xmath269 as @xmath270 and @xmath271 for all @xmath269 and @xmath267 .
then @xmath272}\ , dm(t)\biggr)\\ & & \qquad = e\int 1_{(t_1,t_2]}(t)\ , 1_a(\overline{z}_{t_1 } ) 1_{(x_1,x_2)}(x(t_1))\ , dm(t)\\ & & \qquad = e \int 1_{(t_1,t_2]}(t)\ , 1_a(\overline{z}_{t_1 } ) \lim_{n\rightarrow \infty } 1^{(n)}_{(x_1,x_2)}(x(t_1))\ , dm(t)\\ & & \qquad = e\lim_{n\rightarrow \infty } \int 1_{(t_1,t_2]}(t)\ , 1_a(\overline{z}_{t_1 } ) 1^{(n)}_{(x_1,x_2)}(x(t_1 ) ) \bigl(dn(t)-\lambda(t)\,dt\bigr)\\ & & \qquad=\lim_{n\rightarrow \infty } e \int 1_{(t_1,t_2]}(t)\ , 1_a(\overline{z}_{t_1 } ) 1^{(n)}_{(x_1,x_2)}(x(t_1))\,dm(t).\end{aligned}\ ] ] the last two equalities follow from lebesgue s dominated convergence theorem [ the prior to last equality since , for @xmath273 fixed , the integral is bounded since @xmath25 is finite and @xmath30 is bounded ; the last equality since the integrals are all bounded by @xmath274 , whose expectation is bounded by @xmath275 times the upper bound of  @xmath30 ] .
equation  ( [ enul ] ) and the result of the theorem would follow from theorem  [ thec ] if @xmath277}(t)\ , 1_a(\overline{z}_{t_1 } ) 1^{(n)}_{(x_1,x_2)}(x(t_1 ) ) = h^{(n)}_t(x(t),\overline{z}_{t-})\ ] ] for some @xmath278 from @xmath279 satisfying restriction  [ hreg ] for each fixed @xmath267 . in principle , this seems possible , since @xmath280 is a function of @xmath92 and @xmath23 for every @xmath281 .    indeed , under the conditions above on @xmath51 and @xmath11 , it is possible to find such an @xmath278 , as follows .
write @xmath282 for the solution of the differential equation @xmath283 with ( final or initial , depending on @xmath7 ) condition @xmath284 .
existence and uniqueness of @xmath282 on @xmath2 $ ] for every fixed @xmath99 follows from theorem  [ isun ] in appendix  [ difeqap ] . in this notation , @xmath285}(t)\ , 1_a(\overline{z}_{t_1 } ) 1^{(n)}_{(x_1,x_2)}(x(t_1))\nonumber\\ & & \qquad=1_{(t_1,t_2]}(t)\ , 1_a(\overline{z}_{t_1 } ) 1^{(n)}_{(x_1,x_2)}(x(t_1;t , x(t ) ) ) = h^{(n)}_t(x(t),\overline{z}_{t-})\end{aligned}\ ] ] with @xmath286}(t)\ , 1_a(\overline{z}_{t_1 } ) 1^{(n)}_{(x_1,x_2)}(x(t_1;t , y)).\ ] ] we have to show that ( [ ht ] ) satisfies restriction  [ hreg ] .
first we show that , for @xmath7 fixed , @xmath287 is measurable . from ( [ ht ] )
we see that this is the case if @xmath288 is measurable , which follows immediately from lemma  [ mtb ] .
restriction  [ hreg](a ) is immediate , since @xmath278 is bounded by 1 . for restriction  [ hreg](b ) , we have to prove that , for all @xmath99 , @xmath289 when @xmath127 and @xmath128 .
fix @xmath99 .
we consider three different kinds of @xmath290 . if @xmath291 and @xmath128 , @xmath292 , so that the convergence follows immediately .
if @xmath293 and @xmath128 , eventually @xmath294 , so that the convergence also follows immediately .
if @xmath295 $ ] , convergence of the first two factors is immediate . for the last factor , we need differential equation theory .
@xmath296 is continuous .
thus , to prove that the last factor in equation  ( [ ht ] ) converges , it suffices to show that @xmath297 as @xmath128 and @xmath127 .
fix @xmath99 . for @xmath7
close enough to @xmath290 , we compare the solution of the differential equation with final condition @xmath79 at @xmath7 with the solution of the differential equation with final condition @xmath298 at @xmath290 ; we look at the value of the solution at the time point @xmath299 before both @xmath7 and @xmath290 .
first , notice that because of existence and uniqueness of solutions ( theorem  [ isun ] ) , the solution of the differential equation with final condition @xmath79 at @xmath7 takes a unique value @xmath300 at @xmath290 .
since @xmath269 is differentiable with respect to its first argument with derivative @xmath51 and @xmath51 is bounded by @xmath243 [ assumption  [ dreg](b ) ] , @xmath301 is not far from @xmath79 if @xmath7 is not far from @xmath290 : @xmath302 next , notice that , again because of existence and uniqueness of solutions , the value at @xmath299 of the solution of the differential equation with final condition @xmath79 at @xmath7 is the same as the value at @xmath299 of the solution of the differential equation with final condition @xmath300 at @xmath290 .
this observation implies that @xmath303 for the first inequality , we use corollary  [ difbc1 ] and assumption  [ dreg ] [ notice that possible jumps of @xmath51 at the jump times of @xmath11 do not matter here since one can split up the interval , so if , e.g. , there is just one jump at @xmath304 $ ] , one gets a factor @xmath305 etc .
( a formal proof can be given with induction since , with @xmath99 still fixed , there are only finitely many jumps of @xmath11 ) ] . for the last inequality , we use equation  ( [ yyt ] ) .
if @xmath127 and @xmath128 , the bound in equation  ( [ xafs ] ) converges to @xmath24 for every fixed @xmath99 .
thus , indeed , if @xmath127 and @xmath128 , @xmath306 converges to @xmath307 .
this finishes the proof .
the estimating equations for @xmath308 from section  [ ees ] were all of the form @xmath309 . in the current section
we choose the dimension of @xmath310 the same as the dimension of @xmath308 .
estimating equations of this form are well known .
theorem  [ consas ] below is an example of asymptotic theory in the setting of this article , with conditions in terms of @xmath58 and the intensity process @xmath30 .
notice , however , that these conditions are in fact stronger than necessary . for more theory about these types of estimating equations and less restrictive conditions , see @xcite , chapter  5 . in particular , conditions could be weakened by considering the estimating equations as a whole instead of looking at @xmath58 and @xmath30 separately ( see , e.g. , example  [ weilem ] ) .
we only consider smooth @xmath311 :    [ hregpc ] the functions @xmath312 are measurable and :    every component of @xmath313 satisfies restriction  [ hreg ] .
@xmath314 is bounded by a constant @xmath315 not depending on @xmath117 , @xmath108 , @xmath7 , @xmath79 and @xmath99 .    for each @xmath10 $ ] and @xmath99
, @xmath316 is continuous .
there exists a neighborhood of @xmath135 such that , for each @xmath10 $ ] and @xmath99 , @xmath314 is continuously differentiable with respect to @xmath117 , @xmath108 and @xmath79 , and these derivatives are all bounded by a constant @xmath317 not depending on @xmath117 , @xmath108 , @xmath7 , @xmath79 and @xmath99 .
every component of @xmath318 satisfies restriction  [ hreg ] .
[ consas ] suppose that assumptions   ( bounded intensity process ) , [ @xmath178 cadlag ] , ( no unmeasured confounding ) and   no instantaneous treatment effect are satisfied .
suppose also that , for every @xmath10 $ ] , @xmath92 has the same distribution as @xmath21 given @xmath15 . from theorem   we know
that , for @xmath58 satisfying restriction  , @xmath135 is a zero of @xmath319 suppose now that @xmath135 is the only zero .
suppose , furthermore , that we know that @xmath320 with @xmath321 compact , that @xmath322 is continuous for each @xmath7 and bounded by a constant @xmath323 which does not depend on @xmath324 , and that @xmath325 is continuous for each @xmath7 .
then any sequence of ( almost ) zeros @xmath326 of @xmath327 that is , any sequence of estimators @xmath326 such that @xmath328 converges in probability to zero , is a consistent estimator for @xmath135 for each @xmath122 satisfying restriction  .
suppose , moreover , that @xmath329 is differentiable with the respect to @xmath117 with derivative bounded by a constant @xmath330 in a neighborhood of @xmath118 , and @xmath331 is differentiable with respect to @xmath108 with the derivative bounded by a constant @xmath332 in a neighborhood of @xmath119 .
then for each @xmath58 satisfying restriction  [ hregpc ] there is a neighborhood of @xmath135 such that @xmath333 is continuously differentiable with respect to @xmath308 .
suppose , moreover , that the matrix @xmath334 is nonsingular .
then there exists a sequence of ( almost ) zeros @xmath326 to @xmath335 .
furthermore , any such sequence is asymptotically normal : @xmath336 with @xmath337 the matrix above and , with @xmath338 , @xmath339    proof consistency follows from theorem  5.9 of @xcite . repeatedly applying lebesgue s
dominated convergence theorem shows that our conditions imply the conditions of the first and second paragraph after this theorem  5.9 .
the existence of ( almost ) zeros follows from @xcite , section  3.9 , problem  9 , whose solution is practically given by the hint below it .
this problem  9 states that if @xmath340 is a homeomorphism of a neighborhood of @xmath341 onto a neighborhood of @xmath342 , then every continuous @xmath343 for which @xmath344 is sufficiently small has at least one zero . in our case
@xmath345 is continuously differentiable in a neighborhood of @xmath135 by restriction  [ hregpc](d ) and the assumptions on @xmath116 and @xmath105 , under which differentiation and integration can be exchanged ( twice ) .
the derivative of this @xmath346 at @xmath135 is nonsingular by assumption , and hence , @xmath310 is a homeomorphism of a neighborhood of @xmath341 onto a neighborhood of @xmath347 .
@xmath335 is continuous in @xmath308 and close enough to @xmath346 for large @xmath267 with probability approaching @xmath39 because of the second paragraph below theorem  5.9 in @xcite .
hence , @xmath335 has a zero with probability approaching @xmath39 .
asymptotic normality follows from theorem  5.21 of @xcite , as follows .
define @xmath348 , which is continuously differentiable with respect to @xmath308 in a neighborhood @xmath349 of @xmath135 under our conditions . making @xmath349 smaller
so that all boundedness conditions hold on @xmath349 , we define @xmath350 , which is bounded by @xmath351 , a constant plus a constant times @xmath352 .
this @xmath353 is square integrable since @xmath352 is square integrable : it is well known that counting processes with bounded intensity processes are square integrable [ it follows from , e.g. , proposition  ii.4.1 of andersen et al .
( @xcite ) ] .
for the same reason , @xmath354 .
the remaining conditions of theorem  5.21 from @xcite were checked before , so , indeed , @xmath326 is asymptotically normal with asymptotic covariance matrix ( [ asvar ] ) .    the asymptotic variance ( [ asvar ] ) is often estimated by replacing @xmath135 by their estimates and @xmath355 by @xmath144 .
thus , confidence intervals for @xmath119 can be constructed .
also , tests for whether @xmath119 has a specific value can be constructed that way . for more about testing ,
see section  [ test ] .
one can often simplify the expression for the asymptotic variance in equation  ( [ asvar ] ) using corollary  [ casvar ] below .
we use the following lemma :    [ caslem ] suppose that the conditions of theorem   hold : assumptions  bounded intensity process [ @xmath40 cadlag ] , no unmeasured confoundingno instantaneous treatment effect , for every @xmath10 $ ] , @xmath92 has the same distribution as @xmath21 given @xmath15 ( see section  ) , for each @xmath99 , @xmath11 jumps at most finitely many times , and @xmath51 satisfies regularity condition  . write @xmath356 and @xmath338 .
then for @xmath357 every component of which satisfies restriction   @xmath358 if , furthermore , @xmath359 is a correctly specified model for @xmath30 such that @xmath360 exists and @xmath141 is a correctly specified model for @xmath51 such that , for each @xmath7 , @xmath109 is differentiable with respect to @xmath108 at @xmath361 , then , for @xmath362 satisfying restriction  [ hregpc ] , @xmath363 if the left- or right - hand side exists and @xmath364 if the left- or right - hand side exists , where @xmath365 .    proof for the first statement , we use counting process theory from andersen et al .
( @xcite ) , chapter  2 .
if @xmath366 is a martingale , @xmath367 ( if it exists ) is defined as a predictable process such that @xmath368 is a ( local ) martingale .
if @xmath369 is another martingale , @xmath370 ( if it exists ) is defined as a predictable process such that @xmath371 is a ( local ) martingale .
@xmath367 is called the predictable variation process of @xmath366 and @xmath370 is called the predictable covariation process of @xmath366 and @xmath369 . for vector - valued @xmath366 , @xmath367 is defined as a predictable process such that @xmath372 is a ( local ) martingale .
hence , it is a matrix with @xmath373 at the @xmath374th row , @xmath160th column .    as shown in theorem  [ mgc ]
, @xmath132 is a martingale with respect to the filtration @xmath225 .
counting process martingales like this have compensators : @xmath375 [ see , e.g. , proposition  ii.4.1 in andersen et al .
( @xcite ) ]
. moreover , if @xmath376 and @xmath377 are ( locally ) bounded @xmath225-predictable processes with values in @xmath378 , then @xmath379 exists and @xmath380 [ proposition  ii.4.1 or ( 2.4.9 ) in andersen et al .
( @xcite ) ] . because @xmath381 satisfies restriction  [ hreg ] , @xmath382 is a bounded @xmath225-predictable process ( proof just as in lemma  [ hpred ] ) .
therefore , the theory above leads to @xmath383    for the second statement , notice that , under the conditions of the lemma , @xmath384 and the expectation of the second term here is equal to zero because of theorem  [ thec ] .    for the third statement ,
notice that , under the conditions of the lemma , @xmath385 because of the chain rule , and the expectation of the second term is equal to zero because of theorem  [ thec ] .
this lemma simplifies the asymptotic variance formula of the estimators in equation  ( [ asvar ] ) :    [ casvar ] suppose that the conditions of theorem   hold : assumptions   ( bounded intensity process ) , [ @xmath40 cadlag ] , no unmeasured confounding ( no instantaneous treatment effect ) , for every @xmath10 $ ] , @xmath92 has the same distribution as @xmath21 given @xmath15 ( see section  ) , for each @xmath99 , @xmath11 jumps at most finitely many times , and @xmath51 satisfies regularity condition  .
suppose also that @xmath359 is a correctly specified model for @xmath30 such that @xmath360 exists and that @xmath141 is a correctly specified model for @xmath51 such that , for each @xmath7 , @xmath109 is differentiable with respect to @xmath108 at @xmath361 .
then if @xmath386 and @xmath362 satisfies restriction  [ hregpc ] , the asymptotic variance ( [ asvar ] ) is equal to @xmath387 with @xmath388 and @xmath389 with @xmath390 and , with @xmath365 , @xmath391    we conclude this section with an example to see the machinery work in practice .
notice that the boundedness conditions of theorem  [ consas ] are somewhat too restrictive for this example , but that the results hold true under these weaker restrictions , too .
[ ] [ weilem ] consider the setting of example  , and suppose that the assumptions of section  [ mgs ] are satisfied .
in example   @xmath392 where at risk means at risk for initiation of prophylaxis treatment .
@xmath109 is the solution to the differential equation @xmath393 with final condition @xmath394 and @xmath395 , so @xmath396 in example  [ wei ] we already saw that @xmath397 is a zero of @xmath398 suppose now that @xmath397 is the only zero .
suppose , furthermore , that the survival time @xmath1 takes values in a compact space @xmath399\subset\mathbb{r}$ ] and that we know that @xmath400 , with @xmath401 , @xmath402 , @xmath403 and @xmath404 all four compact ( note that this implies that @xmath201 and @xmath202 are bounded away from @xmath24 )
. then any sequence of ( almost ) zeros @xmath405 of @xmath406 that is , any sequence of estimators @xmath405 such that @xmath407 converges in probability to zero , is a consistent estimator for @xmath397 .
moreover , @xmath389 as in corollary  [ casvar ] exists , and @xmath408 and @xmath409 is a five - dimensional vector with zeros in the first four positions and @xmath410 in the fifth , with @xmath411 if this @xmath337 is a nonsingular matrix , then there exists a sequence of ( almost ) zeros @xmath405 of ( [ weiboh ] ) .
furthermore , any such sequence is asymptotically normal : @xmath412 with @xmath337 the matrix above and @xmath413 moreover , @xmath227 and @xmath228 are asymptotically independent .
the asymptotic independence here turns out to be no coincidence ; see lok ( @xcite ) .
proof of lemma [ weilem ] the findings here are similar to the findings in theorem  [ consas ] , but the boundedness conditions fail to hold here .
consistency follows from @xcite , theorem  5.9 .
existence of a sequence of ( almost ) zeros follows from @xcite , section  3.9 , problem  9 , whose solution is practically given by the hint below it .
asymptotic normality follows from @xcite , theorem  5.21 .
the asymptotic variance equals @xmath414 because of corollary  [ casvar ] ( @xmath30 and @xmath58 are not bounded here , but we can restrict the interval to @xmath215 $ ] for @xmath216 and let @xmath415 ) .
we leave checking the conditions of these theorems to the reader [ or see @xcite ( @xcite ) , section  7.7 ] .
asymptotic independence of @xmath227 and @xmath228 follows by direct calculation , after noticing that @xmath416 with @xmath417 and @xmath418 define @xmath419 this concludes the proof : @xmath420
we show that one can often test whether treatment affects the outcome of interest without specifying a model @xmath141 for @xmath51 .
this was conjectured , but not proved , in @xcite .
if one does not have to specify a model for @xmath51 in order to test whether treatment affects the outcome , false conclusions caused by misspecification of the model for @xmath51 can be avoided .    under the null hypothesis of the no treatment effect , @xmath89 and @xmath421
( see section  [ model ] ) .
if there is no unmeasured confounding , @xmath92 does not predict @xmath26 given @xmath23 ( see theorem  [ mgc ] ) . hence ,
if there is no unmeasured confounding and no treatment effect , adding the _ observed outcome _
@xmath1 to the prediction model for treatment effect should not help the prediction .
this idea , presented in @xcite for the case of local rank preservation ( see section  [ loc ] ) , can be proven to be correct as follows .    technically , the tests in this section are similar to the score test [ for more about the score test see , e.g. , @xcite ( @xcite ) ] .
suppose that the conditions of section  [ mgs ] are satisfied , and that we have a correctly specified parametric model @xmath359 for @xmath30 .
define @xmath422 with @xmath423 satisfying the regularity condition restriction  [ hreg ] .
the key idea of this procedure is that if treatment does not affect the outcome , @xmath89 , so @xmath421 , and @xmath424 has expectation zero because of theorem  [ thec ] .
since @xmath118 is unknown , we base the test on the limiting behavior under @xmath89 of @xmath425 , where @xmath227 is an estimator of the nuisance parameter @xmath118 .
we will show that if @xmath89 , @xmath425 converges to a normal random variable with expectation zero , which leads to a test for whether @xmath89 in the usual way .
the nuisance parameter @xmath118 will be estimated using some set of estimating equations @xmath426 with @xmath427 , @xmath428 differentiable in @xmath117 and @xmath429 .
a natural choice would be a maximum ( partial ) likelihood estimator for @xmath118 .
we suppose throughout this section that the resulting estimator @xmath227 is consistent and asymptotically normal with @xmath430 as will usually follow from , for example , @xcite , theorem  5.21 .    if @xmath116 and @xmath431 are sufficiently smooth , @xmath432 is differentiable with respect to @xmath117 , and a taylor expansion around @xmath118 leads to @xmath433 with @xmath434 the derivative of @xmath435 with respect to @xmath117 and @xmath436 between @xmath118 and @xmath227 .
since @xmath227 converges in probability to @xmath118 , so does @xmath436 .
therefore , usually , @xmath437 .
sufficient conditions under which this holds are given in appendix  [ gcap ] , lemma  [ pgc ] . because of  ( [ thetaas ] ) and the central limit theorem , @xmath438 converges in distribution . therefore , an application of slutzky s lemma leads to @xmath439 with @xmath440 . if @xmath89 , @xmath421 , so that theorem  [ thec ] implies that also the expectation of @xmath441 is equal to zero .
therefore , the central limit theorem can be applied on the vector with @xmath442 on the right - hand side ; it converges to a normal random variable with expectation zero . because of the continuous mapping theorem [ see , e.g. , @xcite ( @xcite ) , chapter  18 ] , @xmath425 then converges to a normal random variable with expectation zero , too
.    calculation of its limiting covariance matrix is standard [ see , e.g.,@xcite ( @xcite ) , chapter  18 ] . to save space , we omit that calculation here . if desirable , one can use theorem  [ thec ] and lemma  [ caslem ] to simplify the expression .
notice that a test for whether @xmath443 for any specific @xmath444 can be constructed in exactly the same way .
if we have a correctly specified model @xmath141 for @xmath51 , this thus also leads to a confidence region for @xmath119 in the usual way , using the duality between testing and confidence regions : include those @xmath108 for which the null hypothesis @xmath445 is not rejected .
the proof of consistency and asymptotic normality of the estimators presented in this article applies to continuous - time structural nested models .
a similar proof applies to structural nested models in discrete time ( when covariates are only measured at finitely many fixed times @xmath446 , which are the same for all patients and known in advance ) .
@xcite argue without proof that consistency and asymptotic normality should hold for discrete time structural nested models under reasonable assumptions ; the proof is completed with the current article , as follows .
it is easy to see that in discrete time , @xmath447 is the compensator of @xmath25 with respect to @xmath29 [ see , e.g. , @xcite ( @xcite ) , section  7.4 ] .
the assumption of no unmeasured confounding can be formalized as @xmath448 since @xmath449 given @xmath193 , this implies that also @xmath450 the discrete - time counterparts of theorem  [ thec ] and theorem  [ mgc ] follow immediately [ see @xcite ( @xcite ) ] .
consistency and asymptotic normality follow in the same way as for continuous time models .
the tests for treatment effect in this article can be carried out without specifying a model for treatment effect ; that is , no model for @xmath51 is needed .
this is an important feature of the tests because it allows one to avoid false conclusions caused by misspecification of the model for @xmath51 . in practice
, it may be hard to specify a correct parametric model for the infinitesimal shift - function , @xmath51 .
thus , it is good that specification of a model for @xmath51 is not needed to test for treatment effect .
the estimators in this article require the correct specification of a model for treatment effect and of a model for prediction of treatment changes . for the discrete - time setting
, @xcite has recently proposed estimators which are doubly robust .
doubly robust estimators are consistent and asymptotically normal if ( i ) the model for prediction of treatment changes ( @xmath30 in the current article ) is correctly specified or if ( ii ) a regression model of a blipped down outcome [ @xmath109 in the current article ] on past treatment- and covariate history @xmath23 is correctly specified . in any case , the model for treatment effect ( @xmath90 in the current article ) has to be well specified .    in this article estimation
started with the specification of a model for the infinitesimal shift - function , @xmath51 .
interpretation of results may be easier when one starts with a model like  ( [ dasim ] ) , @xmath451 , given @xmath452 . here
, @xmath65 is the duration of treatment in the interval @xmath66 .
the main results in the current article apply also to this model .
the proofs for theorems  [ thec ] and  [ consas ] do not depend on @xmath110 being the solution to @xmath453 .
the proof of theorem  [ mgc ] does depend on @xmath453 , but it simplifies considerably if ( [ dasim ] ) or  ( [ dasim2 ] ) is used as a starting point .
let us show this for ( [ dasim ] ) .
define @xmath454 . using the first part of the proof of theorem  [ mgc ] , for @xmath455 , @xmath285}(t )
1_{a}(\overline{z}_{t_1})1^{(n)}_{(x_1,x_2)}(\tilde{x}(t_1))\\ & & \qquad=1_{(t_1,t_2]}(t ) 1_{a}(\overline{z}_{t_1})1^{(n)}_{(x_1,x_2)}\bigl(\tilde{x}(t)+\mathit{dur}(t_1,t ) ( -1+e^\psi)\bigr)\\ & & \qquad = h_t^{(n)}(\tilde{x}(t),\overline{z}_{t-}),\end{aligned}\ ] ] where @xmath456 is the duration of treatment in the interval @xmath457 .
@xmath458 is measurable if the duration of treatment until @xmath7 is in included in @xmath6 .
moreover , if @xmath459 and @xmath127 , then @xmath460 .
hence , it follows immediately that @xmath458 satisfies restriction  [ hreg ] , which concludes the proof .
depending on the specific application , it will be more appropriate to start with @xmath461 given @xmath452 or with a model for @xmath51 ; see , for example , example  [ prior ] .    in the previous literature
[ see , e.g. , robins et al .
( @xcite ) , @xcite , witteman et al .
( @xcite ) , keiding et al .
( @xcite ) and hernn et al . ( @xcite ) ] applications have been carried out under the assumption of local rank preservation , where @xmath148 for each @xmath7 . as pointed out in these papers , and as discussed in section  [ loc ] , the assumption of local rank preservation is generally considered implausible .
this article relaxes the assumption of local rank preservation in structural nested models .
the estimators and tests applied in the previous literature are specific cases of the estimators and tests studied in this article , with the only difference that some of the estimators in the previous literature allow for censoring of @xmath1 . aside from the issue of censoring
, this article provides a mathematical foundation behind previous estimators , relaxes the specification of the counterfactual outcomes as deterministic variables , and allows for a distributional interpretation of the estimators .
@xcite conjectures that one can often use standard software to test whether treatment affects the outcome of interest ( without specifying a model @xmath90 for @xmath51 ) , and to estimate @xmath108 .
lok ( @xcite ) shows that both testing and estimation can also be considered from a partial likelihood point of view .
as shown in lok ( @xcite ) , this approach leads to a subclass of the estimators and tests studied in this article which can indeed be calculated with standard software .
example  [ wei ] is a specific case of that .
the possibility to use standard software may be a good reason to choose these estimators in practice .
see @xcite and lok ( @xcite ) for a more elaborate discussion .
the approach adopted in the current article leads to a large class of estimators and tests . when treatment and covariates change at finitely many fixed times only , robins ( @xcite ) proposes , without proof , an optimal procedure for survival and nonsurvival outcomes , respectively .
the optimal choice of estimators or tests under the framework of this article is another intriguing topic for future research .
the current article assumes a parametric model @xmath116 for the prediction of treatment changes . in practice
, applications have often used a semi - parametric cox model for @xmath116 .
@xcite shows that specifying @xmath116 using a semiparametric cox model leads to unbiased estimating equations , which just as in this article are martingales for the true parameters .
consistency and asymptotic normality of the resulting estimators for @xmath51 still remain to be shown and constitute interesting topics for future research .    in many applications ,
observations are censored .
@xcite and hernn et al .
( @xcite ) have proposed methods to deal with censoring that could potentially be adapted to the results in this paper . for @xmath51 of the form of example  [ daexa ] , @xcite includes proofs with censoring due to the fact that the study ends , so - called administrative censoring , using ideas from these previous papers .
the estimators in this paper depend on solving a differential equation for each observation . in the examples , these equations are simple enough to be solved analytically .
if that is not possible , these equations should be solved numerically .
it might be worth investigating how a small contamination of the solution to the differential equation @xmath92 affects the estimates of treatment effect .
i conclude with a discussion of the assumptions used in this article .
the most important assumption in this article is the assumption of no unmeasured confounding ( assumption  [ intconf ] ) . as discussed before ,
this assumption is valid if all information has been recorded which both ( i ) predicts treatment decisions and ( ii ) is an independent risk factor for the outcome of interest .
the validity of the assumption of no unmeasured confounding can not be tested statistically , and depends on the quality of the recorded information .
therefore , it is for subject matter experts to decide about the plausibility of the assumption of no unmeasured confounding .
second , we only estimate the effect of treatment for which a short duration of treatment has only a small effect on the distribution of the outcome of interest .
the effect of the treatment on an individual patient may be large , as long as the probability of such an effect is small for any small duration of treatment .
third , the assumption of no instantaneous treatment effect ( assumption  [ jump ] ) is also restrictive : it excludes the estimation of the effect of treatments that have instantaneous effects , such as surgery or other point exposures .
the remaining assumptions in this article are mostly benign .
the assumption that the covariate- and treatment process can be represented by a cadlag process is generally accepted for most medical situations [ see , e.g. , andersen et al .
( @xcite ) ] .
the functions @xmath122 and @xmath90 can be chosen such that the regularity conditions on these functions are satisfied .
even if @xmath122 is not bounded , it can often be approximated by bounded functions , and results may follow by a simple application of lebesgue s dominated convergence theorem [ see , e.g. , example  [ wei ] ] . the same is true for the boundedness condition ( assumption  [ int ] ) of the intensity process @xmath30 .
assumption  [ ycadlag ] that the counterfactual process @xmath21 is cadlag is impossible to verify , but it is a plausible and convenient regularity condition .
[ isun ] suppose that a function @xmath76 satisfies the following :    ( ) .
if @xmath11 does not jump in @xmath239 , then @xmath76 is continuous in @xmath240 on @xmath241 and can be continuously extended to @xmath242 $ ] .
( ) . for each @xmath99 , there exists a constant @xmath462 such that @xmath463 for all @xmath10 $ ] and all @xmath248 .
suppose , furthermore , that , for each @xmath99 , there are no more than finitely many jump times of @xmath11 .
then , for each @xmath124 $ ] and @xmath125 , there is a unique continuous solution @xmath464 to @xmath465 with boundary condition @xmath466 and this solution is defined on the whole interval @xmath2 $ ] .
this theorem follows from well - known results about differential equations ; see , for example , @xcite , chapter  2 .    for the next theorem
, we also refer to @xcite , chapter  2 .
it is a consequence of gronwall s lemma .
[ difb ] suppose that @xmath467 is an open or closed interval in @xmath468 , @xmath469 is continuous and @xmath470 is continuous , and suppose that @xmath471 for all @xmath472 and @xmath473 .
then , for every @xmath474 and @xmath125 , there is a unique solution @xmath475 of @xmath476 with @xmath477 , and this solution is defined for all @xmath472 .
if @xmath478 is continuous and @xmath479 is a solution of @xmath480 , then @xmath481 for all @xmath482 with @xmath483 .    in @xcite
the interval is always an open interval , but as is generally known , this can be overcome by extending both @xmath484 and @xmath310 outside the closed interval @xmath467 by taking the values at the boundary of @xmath467 .
this preserves the lipschitz- and continuity conditions .
existence and uniqueness on all of finitely many intervals implies global existence and uniqueness .
we have a differential equation with end condition at @xmath3 , so we are interested in @xmath485 with @xmath486 :    [ difbc1 ] suppose that the conditions of theorem   are satisfied .
then , for every @xmath474 and @xmath487 , there is a unique solution @xmath475 of @xmath476 with @xmath477 , and this solution is defined for all @xmath472 . if @xmath478 is continuous and @xmath479 is a solution of @xmath480 , then @xmath488 for all @xmath485 with @xmath486 .    proof put @xmath489 .
then @xmath490 where @xmath491 .
thus , @xmath489 is a solution of the differential equation @xmath492 with boundary condition @xmath493 .
define also @xmath494 .
applying theorem  [ difb ] on @xmath301 concludes the proof , as follows : @xmath495 with @xmath496 notice that , because of equation  ( [ lc2 ] ) , @xmath497 with @xmath498 .
hence , theorem  [ difb ] implies that @xmath499 for the first term , we do a change of variables ; @xmath201 from @xmath24 to @xmath7 , put @xmath500 ; @xmath501 .
@xmath502 ; @xmath503 from @xmath504 to @xmath505 .
we conclude that the first term is equal to @xmath506 for the second term , similar changes of variables can be done , resulting in corollary  [ difbc1 ] .
in most of this article we assume that the function which maps @xmath549 to @xmath550 , with @xmath551 , is a measurable function on @xmath123 , with the projection @xmath18-algebra on @xmath552 ( see section  [ sets ] ) .
moreover , we sometimes assume that the function which maps @xmath553 to @xmath92 , with @xmath551 , is a measurable function on @xmath554 . in this appendix
we give sufficient conditions for this .
if these two functions are measurable , @xmath233 is a filtration , and , moreover , @xmath233 is the same as @xmath555 [ see equation  ( [ fil ] ) in section  [ mgs ] ] .
[ mtb ] suppose that @xmath51 satisfies regularity assumption   and that , for each @xmath99 , @xmath11 jumps at most finitely many times .
then the function which maps @xmath549 to @xmath550 , with @xmath551 , is a measurable function from @xmath123 to @xmath378 . also , the function which maps @xmath553 to @xmath92 , with @xmath551 , is a measurable function from @xmath123 to @xmath378 .    for the proof of this result , which is quite technical since many results on differential equations
are nonconstructive , we refer to @xcite .
the proof uses the idea behind euler s forward method to approximate the solution to the differential equation .
the following lemma is a worked - out case of theory from @xcite , chapter  19 .
[ pgc ] let @xmath556 be i.i.d .
random variables with values in a measurable space @xmath557 .
let @xmath558 be a collection of measurable functions from @xmath557 to @xmath559 indexed by a subset @xmath560 which contains an open neighborhood @xmath561 of @xmath118 .
suppose that @xmath562 is continuous on @xmath561 for every @xmath563 .
suppose also that there exists a measurable function @xmath52 on @xmath557 such that @xmath564 for every @xmath565 and such that @xmath566 exists . then if @xmath227 converges in probability to @xmath118 , @xmath567 where @xmath144 indicates the empirical distribution of @xmath568 .
proof notice that @xmath569 we show that both terms converge to zero in probability .
choose @xmath570 compact and such that it contains an open neighborhood of @xmath118 .
example  19.8 from @xcite implies that , under the conditions above , @xmath571 since @xmath572 and @xmath573 contain an open neighborhood of @xmath118 , this implies that the first term converges in probability to zero . for the second term ,
notice that , on @xmath561 , @xmath574 is continuous in @xmath117 and that each of the components of @xmath575 is bounded by the integrable function @xmath52 , so that lebesgue s dominated convergence theorem implies that @xmath576 is continuous in @xmath117 on @xmath561 .
thus , since @xmath572 , also the second term converges in probability to zero .
an earlier version of this article was a chapter of my ph.d .
dissertation at the free university of amsterdam .
i am indebted to richard gill and aad van der vaart for their support , insight and encouragement on this project .
i also thank james robins for fruitful discussions .
i thank both referees for helpful suggestions . besides that , i thank the netherlands organization for scientific research ( nwo ) for a scholarship .
hernn , m. a. , cole , s. r. , margolick , j. , cohen , m. and robins j. m. ( 2005 ) .
structural accelerated failure time models for survival analysis in studies with time - varying treatments . _ pharmacoepidemiology and drug safety _ * 14 * 477491 .
keiding , n. , filiberti , m. , esbjerg , s. , robins , j. m. and jacobsen , n. ( 1999 ) .
the graft versus leukemia effect after bone marrow transplantation : a case study using structural nested failure time models .
_ biometrics _ * 55 * 2328 .
lok , j. j. , gill , r. d. , van der vaart , a. w. and robins , j. m. ( 2004 ) . estimating the causal effect of a time - varying treatment on time - to - event using structural nested failure time models . _
statist . neerlandica _ * 58 * 271295 .
mark , s. d. and robins , j. m. ( 1993 ) .
estimating the causal effect of smoking cessation in the presence of confounding factors using a rank preserving structural failure time model .
_ statistics in medicine _ * 12 * 16051628 .
robins , j. m. ( 1989 ) . the analysis of randomized and non - randomized aids treatment trials using a new approach to causal inference in longitudinal studies . in _
health service research methodology : a focus on aids _
( l. sechrest , h. freeman and a. bailey , eds . ) 113159 .
nchsr , u.s .
public health service , washington , dc .
robins , j. m. ( 1993 ) .
analytic methods for hiv treatment and cofactor effects . in _ methodological issues of aids behavioral research _ ( d. g. ostrow and r. kessler , eds . ) 213287 . plenum press , new york .
robins , j. m. ( 2000 ) .
robust estimation in sequentially ignorable missing data and causal inference models . in _ proceedings of the american statistical association section on bayesian statistical science _
* 1999 * 610 .
robins , j. m. , blevins , d. , ritter , g. and wulfsohn , m. ( 1992 ) .
g - estimation of the effect of prophylaxis therapy for pneumocystis carinii pneumonia on the survival of aids patients
. _ epidemiology _ * 3 * 319336 .
robins , j. m. , rotnitzky , a. and scharfstein , d. o. ( 2000 ) .
sensitivity analysis for selection bias and unmeasured confounding in missing data and causal inference models . in _ statistical models in epidemiology the environment and clinical trials _ ( m. e. halloran and d. berry , eds . )
springer , new york .
robins , j. m. and wasserman , l. ( 1997 ) .
estimation of effects of sequential treatments by reparameterizing directed acyclic graphs . in _ proceedings of the thirteenth conference on uncertainty in artificial intelligence _
( d. geiger and p. shenoy , eds . ) 409420 .
morgan kaufmann , san francisco , ca .
witteman , j. c. m. , dagostino , r. b. , stijnen , t. , kannel , w. b. , cobb , j. c. , de ridder , m. a. j. , hofman , a. and robins , j. m. ( 1998 ) .
g - estimation of causal effects : isolated systolic hypertension and cardiovascular death in the framingham study
. _ american j.  epidemiology _ * 148 * 390401 .