Showing posts with label time dependent covariates. Show all posts
Showing posts with label time dependent covariates. Show all posts

Friday, 23 November 2012

Ties between event times and jump times in the Cox model


Xin, Horrocks and Darlington have a new paper in Statistics in Medicine. This considers approaches for dealing with ties in Cox proportional hazard models, not between event times but between event times and changes to time dependent covariates.

If a change in a time-dependent covariate coincides with a failure time there is ambiguity over which value of the time dependent covariate, z(t+) or z(t-), should be taken for the risk set at time t. By convention, it is usually assumed that z(t-) should be taken, i.e. that the change in the covariate occurs after the failure time. The authors demonstrate that for small sample sizes and/or a large proportion of ties, the estimates can be sensitive to the convention chosen. The authors also only consider cases where z(t) is a binary indicator that jumps from 0 to 1 at some point and cannot make the reverse jump. Obviously this will magnify the potential for bias because the "change after" convention will always underestimate the true risk whereas the "change before" will always overestimate the true risk.

The authors consider some simple adjustments for the problem: compute the "change before" and "change after" estimates and take their average or use random jittering. A problem with the averaging approach is estimating the standard error of the resulting estimator. An upper bound can be obtained by assuming the two estimators have perfect correlation. The jittering estimator obviously has the problem that different random jitters will give different results, though in principle the jittering could be repeated multiple times and combined in a fashion akin to multiple imputation.

It is surprising that the further option of adopting an method akin to the Efron method for ties. Essentially at each failure time there is an associated risk set. It could be argued that every tied covariate jump time had a 50% chance of occurring before or after the failure time. The expected contribution from a particular risk set could then be
It should also be possible to apply this approach using standard software, e.g. coxph() in R. It is simply necessary to replace any (start,stop) interval that ends with a tied "stop" with two intervals (start, stop - 0.00001) and (start, stop + 0.00001) each of which are associated with a weight of 0.5.

Sunday, 28 October 2012

Survival analysis with time varying covariates measured at random times by design


Stephen Rathbun, Xiao Song, Benjamin Neustiftler and Saul Shiffman have a new paper in Applied Statistics (JRSS C). This considers estimation of a proportional hazards survival model in the presence of time dependent covariates which are only intermittently sampled at random time points. Specifically they are interested in examples relating to ecological momentary assessment where data collection may be via electronic devices like smart phones and the decision on sampling times can be automated. They consider a self-correcting point-process sampling design, where the intensity of the sampling process depends on the past history of sampling times, which allows an individual to have random sampling times that are more regular than would be achieved from a Poisson process.

The proposed method of estimation is to use inverse intensity weighting to obtain an estimate of an individual's integrated hazard up to the event time. Specifically the estimator is for a individual with sampling times at times and point process sampling intensity . This then replaces the integrated hazard in an approximate log-likelihood.

In part of the simulation study and in an application the exact point process intensity is unknown and taken from empirical estimates from the sample. Estimating the sampling intensity didn't seem to have major consequences on the integrity of the model estimates. This seems to suggest the approach might be applicable in other survival models where the covariates are sampled longitudinally in a subject specific manner, provided a reasonable model for sampling can be devised.

Drawbacks of the method seem to be that covariates measured at baseline (which is not a random time point) cannot be incorporated in the estimate and that it seems that the covariates must be measured at the event time which may not be the case in medical contexts. The underlying hazard also needs to be specified parametrically, but as stated flexible spline modelled can be used.

Tuesday, 2 October 2012

Effect of an event occurring over time and confounded by health status: estimation and interpretation. A study based on survival data simulations with application on breast cancer


Alexia Savignoni, David Hajage, Pascale Tubert-Bitter and Yann De Ryckea have a new paper in Statistics in Medicine. This considers developing illness-death type models to investigate the effect of pregnancy on the risk of recurrence of cancer amongst breast cancer patients. The authors give a fairly clear account of different potential models with particular reference to the hazard ratio The simplest model to consider is a Cox model with a single time dependent covariate representing pregnancy, here . This can be extended by assuming non-proportional hazards which effectively makes the effect time dependent i.e. . Alternatively, an unrestricted Cox-Markov model could be fitted with separate covariate effects and non-parametric hazards from each pregnancy state, yielding: This model can be restricted by allowing a shared baseline hazard for giving either under a Cox model with a fixed effect or for a time dependent effect.

If we were only interested in and any of these models seems feasible, there doesn't actual seem that much point in formulating the model as an illness-death model. Note that the transition rate does not feature in any of the above equations but would be estimated in the illness-death model. The above models can be fitted by a Cox model with a time dependent covariate (representing pregnancy) that has an interaction with the time fixed covariates. The real power of a multi-state model approach would only become apparent if we were interested in the overall survival for different covariates, treating pregnancy as a random event.

The time dependent effects are represented simply via a piecewise constant time indicator in the model. The authors do acknowledge that a spline model would have been better. The other issue that could have been considered is whether the effect of pregnancy depends on time since initiation of pregnancy (i.e. a semi-Markov effect). An issue in their data example is that pregnancy is only determined via a successful birth meaning there may be some truncation in the sample (through births prevented due to relapse/death).

Tuesday, 31 July 2012

A multistate modelling approach for pancreatic cancer development in genetically high risk families

Kolamunnage-Dona, Vitone, Greenhalf, Henderson and Williamson have a new paper in Applied Statistics. This uses a competing risks model with shared frailties to model data on the progression of pancreatic cancer in the presence of clustering and informative censoring. Clustering is present due to data being available on patients from the same family groups. A patient having a resection causes censoring of the main event, time to pancreatic cancer, but is likely to be informative. This is dealt with by allowing the cause-specific hazards to depend on the same frailty term. The methodology in the paper is very similar to that of Huang and Wolfe (Biometrics, 2002), the only extension being that the current formulation allows for the possibility of time dependent covariates. It isn't clear what if any complication this adds to the original procedure in Huang and Wolfe. An MCEM algorithm is used where the E-step is approximated by using Metropolis-Hastings in order to calculate the required expected quantities. It's not clear what the authors mean when they say the Metropolis-Hastings step use "a vague prior for the frailty variance." Hopefully they mean an improper uniform prior as otherwise they would be pointlessly adding Bayesian features to an otherwise frequentist estimating procedure. On a related computational point, since the random effect for each cluster is one dimensional, I suspect using a Laplace approximation to compute the required integrals at each step would perform quite well and be a lot faster than using Metropolis-Hastings

In the analysis there does seem evidence for a shared frailty within clusters, but it appears that the parameter which links the frailty in the time to pancreatic cancer to the time to resection intensity is hard to identify having a very wide 95% confidence interval encompassing strong negative dependence through independence to strong positive dependence. The typical cluster size in the data is quite small (e.g. median is 3) and this is probably insufficient as you would ideally need some subjects to fail and some to be informatively censored in each cluster to assess their association. The point estimate is negative implying a counter intuitive negative association between resection and pancreatic cancer. The authors suggest as a model extension to allow a specific bivariate frailty linking competing risks (presumably within individuals?) - which is unlikely to be helpful.

Wednesday, 25 April 2012

Use of alternative time scales in Cox proportional hazard models: implications for time-varying environmental exposures

Beth Griffin, Garnet Anderson, Regina Shih and Eric Whitsel have a new paper in Statistics in Medicine. The paper investigates the use of different time scales (e.g. other than either study time or patient age) in cohort studies analysed via Cox proportional hazard models. Of particular focus is the use of calendar time as an alternative time scale, with a motivation in the variation of environmental exposures over time. They perform a simulation study considering two scenarios for the relationship between a time varying environmental exposure variable and calendar year. In the first scenario these are made independent, while the second scenario assumes a linear relationship. As one might expect, when there is no correlation between calendar time and the time dependent environmental exposure, estimates are unbiased regardless of the choice of time scale. When a linear relationship exists then models that account for calendar time, either as the primary time scale or as additional covariates in the model. Again, this isn't necessarily surprising because the model is effectively attempting to include a year effect twice, once in the baseline hazard and again as a large component of the time dependent covariate, e.g. you are fitting a model with "mean environmental exposure in year t" and "environmental exposure" as covariates and expecting the latter to have the correct coefficient. The paper only gives a simulation study, I don't think it would have been that hard to have given some basic theoretical results in addition to the simulations.
The conclusion of the paper, albeit with caveats, is that attempting to adjust for calendar time because you suspect the environmental exposure may be correlated with time is not useful. Clearly if there are other reasons to suspect that calendar year may be important to the hazard in a study then there is an inherent lack of information in the study to establish whether the environmental exposure is directly affecting the hazard or whether it is an indirect effect due to the association with calendar time. Ideally, one would look for other calendar time dependent covariates (e.g. prevailing treatment policy regimes etc.) and perhaps try directly adjusting for them rather than calendar time itself.

Tuesday, 27 March 2012

Modeling Left-truncated and right-censored survival data with longitudinal covariates

Yu-Ru Su and Jane-Ling Wang have a new paper in the Annals of Statistics. This considers the problem of modelling survival data in the presence of intermittently observed time varying covariates when the survival times are both left truncated as well as right-censored. They consider a joint model which involves assuming there exists a random effect which influences both the longitudinal covariate values (which are assumed to be a function of the random effects plus Gaussian error) and the survival hazard. Considerably work has been done in this area in cases where the survival times are merely right-censored (e.g. Song, Davidian and Tsiatis, Biometrics 2002). The authors show that the addition of left-truncation complicates inference quite considerably; firstly because the parameters affecting the longitudinal component may not be identifiable and secondly because the score equations for the regression and baseline hazard parameters become much more complicated than in the right-censoring case. To alleviate this problem, the authors propose to use a modified likelihood rather than either the full or conditional likelihood. The full likelihood can be expressed in terms of an integral over the conditional distribution of the random effect, given the event time occurred after the truncation time. The proposed modification is to instead integrate over the unconditional random effect distribution. Heuristically this is justified by noting that
and
where is the random effect. The authors also show inference based on this modified likelihood gives consistent and asymptotically efficient estimators of the regression parameters and the baseline survival hazard.

An EM algorithm to obtain the MMLE is outlined, in which the E-step involves a multi-dimensional integral which the authors evaluate through Monte Carlo approximation. The implementation of the EM algorithm is simplified if the random effect is assumed to have a multivariate Normal distribution.

Wednesday, 7 December 2011

Intermittent observation of time-dependent explanatory variables: a multistate modelling approach

Brian Tom and Vern Farewell have a new paper in Statistics in Medicine. This considers the problem of estimating the effect of a time dependent covariate on a multi-state process when both the disease process of interest and the time dependent covariate are only intermittently observed. The most common existing approach to dealing with this problem is to assume that the time dependent covariate is constant between observations, taking the last observed value. The authors instead jointly model the two processes as an expanded multi-state model, if the disease process had n states and the covariate process m states the resulting process will have states. An additional assumption, that movements in the covariate process are not directly affected by the state of the disease process, is also made.

A simulation study is performed which shows that the approach of assuming the time dependent covariate is constant leads to biased estimates, particularly when there is a bias in the trend of the covariate process (e.g. much more likely to decrease than increase in value).

The overall approach taken by the authors is to model their way out of difficulty. They assume that both the disease process of interest and the covariate process are jointly time homogeneous Markov and the validity of the results will depend on these assumptions being correct. As noted by the authors, if the covariate can take more than a small number of values the approach becomes unattractive because of the large number of nuisance parameters required. A point not really emphasized, but related to the analogous approach taken by Cortese and Andersen for continuously observed competing risks data (bizarrely not referenced in this paper despite massive relevance!), is that having modelled the time dependent covariate, the model can then be used to make overall predictions.

One could argue that the convention of following forward the covariate value observed from the previous period is a way of allowing a prediction to be made about the trajectory in the next period. A fairer comparison in some cases might therefore be to look at the bias in estimating the transition probabilities to time given a covariate variate value of at time . While we would expect these estimates still to be biased, the amount of bias is likely to be less than found by looking at the regression coefficients directly.

An open problem seems to be the development of methods that do not require strong assumptions, or else are robust to misspecification, to deal with intermittently observed time dependent covariates.

Wednesday, 13 July 2011

Combined survival analysis of cardiac patients by a Cox PH model and a Markov chain

Michal Shauly, Gad Rabinowitz, Harel Gilutz and Yisrael Parmet have a new paper in Lifetime Data Analysis. This considers methods for modelling the effect of a mixture of time dependent and time constant covariates on overall survival, with the complication that the time dependent covariates are only observed at a discrete set of time points. They propose to firstly fit a Cox proportional hazard model assuming all covariates are fixed at their baseline values. The main modelling approach is to assume a discrete-time homogeneous Markov model with states corresponding to the combinations of the time dependent covariates (which are categorical or need to be categorized) and death. Transitions between all covariates states are assumed to be possible between each time point. The Cox model is used to determine which of the constant covariates should be considered in the Markov model. For this the authors propose to again categorize the covariates and consider a separate Markov model for each level of the covariates. Having obtained the estimates from the Markov models, it is then possible to calculate expected survival times for patients conditional on their baseline characteristics.

In general the approach proposed is reasonably sensible. However, there is panel data available for the time dependent covariates. It therefore seems possible to fit a time continuous Markov model to the data using methods appropriate for panel data (e.g. Kalbfleisch and Lawless, 1985). This approach has the advantage that the exact time of the death events can still be used.

The authors rely on categorization throughout. While this seems necessary for the time dependent covariates, there seems scope for using multinomial logit models for other covariates. Similarly, by allowing a different mortality probability for each combination of covariates they are effectively fitting covariate models with interactions (i.e. the effect of being in covariate level 2 compared to 1, is different depending on which level(s) of the other time dependent covariate(s) a subject is in). While such interactions may be necessary, it might be better to allow simpler models where only the evolution of the time dependent covariates is kept general. This is another advantage of a continuous time model since covariate effects could remain on the hazard (transition intensity) scale as in the Cox PH model.

Finally, the authors give a partial justification of the use of a time homogeneous Markov model through the Cox PH model having an approximately constant baseline hazard. It should be noted that a time homogeneous Markov model does not imply a constant absorption hazard (unless the model begins in the quasi-stationary distribution). Conversely, while a constant hazard might suggest homogeneity more than non-homogeneity, it is nevertheless possible to construct non-homogeneous processes with constant (or near constant) marginal absorption hazards. The authors do however report a statistic which gives a better justification of homogeneity.

Friday, 10 June 2011

Comparison of prediction models for competing risks with time-dependent covariates

Giuliana Cortese, Thomas Gerds and Per Kragh Andersen have a new paper available as a University of Copenhagen Department of Biostatistics technical report. The paper concerns the development of models for prediction for competing risks in the presence of internal time dependent covariates. This is a follow-up to Cortese and Andersen's 2010 Biometrical Journal paper. Like the previous paper, the authors compare a multi-state modelling approach that explicitly models the progression of the (categorical) time dependent covariate and its effect on the cause specific hazards, and a landmarking approach that sets (arbitrarily chosen) time points and performs separate regressions to estimate the hazards for conditional on the value of the time dependent covariate at time . The authors consider two modelling approaches under landmarking, one based on Cox regression of cause-specific hazards and the other based on Fine-Gray subdistribution hazards.

They compare the predictive ability of the models to predict the outcome by landmark given data up to . This is assessed by using a time dependent Brier score (Gerds & Schumacher, 2006). Rather than use inverse probability weighting, the authors instead use a pseudo-value to estimate outcomes when a subject is lost to follow-up between and . The authors perform the comparison using a bone marrow transplant study where the competing events are relapse and death, and the internal time dependent covariate is the development of Graft versus Host Disease (GvHD). The predictive abilities are estimated via cross-validation involving randomly choosing 2/3 of patients as training data and using the remainder as test data, repeating the process 100 times. For the data considered the three methods performed equally well in terms of prediction error. As might be expected, there was significantly improved predictive ability of these models compared to one that ignored GvHD (i.e. only considered baseline time constant covariates).

As the authors note, there are advantages and disadvantages to both approaches. The multi-state modelling approach requires modelling of the covariate process (e.g. Markov or semi-Markov assumptions and proportional hazard assumptions on the effect of baseline covariates on transition rates through covariate states) and requires a categorical covariate. Landmarking can accommodate continuous covariates but relies on an arbitrary set of landmark times and requires fitting regressions at each landmark. The extra modelling required for the multi-state approach may either be a blessing, in terms of having the potential to give a greater insight into the whole process, or a curse (questions of robustness to incorrect modelling assumptions).

Tuesday, 1 March 2011

Modelling time to event with observations made at arbitrary times

Matthew Sperrin and Iain Buchan have a new paper available at the arXiv. This concerns the interesting problem of developing survival models in the presence of time dependent covariates that are only observed at baseline, for data with delayed entry (i.e. left truncation).

A large proportion of the paper is devoted to arguing that in studies where the entry time does not involve an intervention and follow-up is over a long period, it is more appropriate to use age as the primary timescale rather than using study time and including age at entry as a covariate. The latter approach can lead to counterintuitive results where a 50 year old is more likely to survive to 70 than a 55 year old with the same covariate values except age.

The paper is less convincing when it comes to possible solutions to the problem of time dependent covariates only observed at baseline. Their approach is essentially to assume that

for some arbitrary function f(t). Hence it is assumed that the time dependent covariates vary deterministically so that a subject who has lower than average blood pressure aged 30, will have increasing blood pressure as they age but stay at the same (age specific) quantile. Obviously a first issue is how realistic this is, especially for modelling internal covariates. Assuming this model is correct, Sperrin and Buchan propose a two-step procedure in which they firstly regress the observed baseline covariate values on t to estimate f(t). They then use the residuals from this procedure to put into standard proportional hazards or accelerated failure time models. A problem that they freely acknowledge is that the observed baseline covariate values will be biased if they are, for instance, both increasing with age and associated with increased hazard. They suggest, but don't implement, some form of iterative procedure to accommodate this.

They seem to have overlooked a trivial way around this problem: For a Cox proportional hazards models when f(t) is assumed linear with unknown slope v (as in their example), if we observe covariate value at time then this implies




i.e. the deterministic part of the time dependent covariate is merely absorbed into the baseline hazard and it is just necessary to include age at entry as an additional covariate. For non-linear models we have:




Here the latter term could be accommodated, for instance, by including a spline function of time of entry within the Cox-regression. A similar argument can be made for accelerated failure time models, e.g. a Buckley-James model, in that case the f(t) term can be incorporated into the residual survivor distribution. Similarly, it is easily extended to multiple covariates.

If a parametric model is used under this formulation it is only valid under the assumption that the parametric hazard family applies to the hazard with the deterministic part of the time dependent covariates included, but this is also true for Sperrin and Buchan's approach (assuming f(t) has been estimated correctly).

Having resolved these issues it is still unclear when such a model would be appropriate. It seems that a useful prediction model is only possible from baseline measured covariates if the covariates vary in time in a deterministic way. For truly time-varying covariates, while studies with relatively short follow-up will be able to give reasonable estimates of the effect of the covariate on survival, prediction requires a longitudinal set of covariate observations. Landmarking or multi-state modelling are then possible approaches to account for the time varying covariates. Update: This paper has now been published in Statistics in Medicine (highlighting the quality of their peer reviewers!).

Thursday, 12 August 2010

Two Pitfalls in Survival Analyses of Time-Dependent Exposure: A Case Study in a Cohort of Oscar Nominees

Wolkewitz, Allignol, Schumacher and Beyersmann have a new paper in The American Statistican. This uses data on the survival outcomes of Oscar nominees as a nice illustrative example of the possibility of length bias and time dependent bias in survival analysis problems. This was originally considered by Redelmeier and Singh in an Annals of Internal Medicine paper where it is was claimed that winning an Oscar significantly increased survival prospects. Possible pitfalls of such an analysis could be assuming everyone is at risk of death from birth rather than when they enter the study (e.g. at nomination), assuming people who win an Oscar have the hazard relating to the win from the time of first nomination rather than the time they actually won, and so forth. The authors show the correct model, as well as a series of possible incorrect models, in terms of multi-state models.

Monday, 3 August 2009

Estimating dementia-free life expectancy for Parkinsons patients using Bayesian inference and microsimulation

Van den Hout and Matthews have a new paper in Biostatistics involving a random-effects Markov model with time (age) dependent intensities. The methodology is close to that used by Pan et al and Wu et al, using a WinBUGS/OpenBUGS Bayesian approach. They use a three-state illness-death model without recovery. A more sophisticated multivariate log-normal random effect on the effects of age on the intensities is used with a Wishart prior is used on the covariance matrix, which is more appropriate than the Gamma(e,e) type priors used by Pan et al. Like their recent Applied Statistics paper, time dependencies in the intensities are accounted for by assuming an individual that is observed at times t1 and t2 has a constant matrix of intensities between those points, but different assumptions are used to calculate life expectancies. The main methodological development is obtaining life expectancy estimates through 'microsimulation.' This is deemed necessary because there are two levels of variation: variation in the posterior of the parameters and variation from the random effects distribution conditional on the parameters. 'Microsimulation' (or simulation) just approximates the integral over the random effects distribution.

Monday, 6 April 2009

Competing risks and time-dependent covariates

Cortese and Andersen have a paper available as a research report from the Department of Biostatistics, University of Copenhagen. This concerns the problem of prediction in competing risks models where there are internal time-dependent covariates, meaning the trajectory of the covariate is not predictable, nor is it independent of the development of the disease/mortality process. The authors focus on the case where the time-dependent covariate is binary, and once it has value 1, cannot revert to value 0. They investigate three approaches. The first expands the state space of the competing risks model, having two alive states: 'alive and cov=0' and 'alive and cov=1' and applies standard methods based on Nelson-Aalen and Aalen-Johansen estimators. The two other methods are based on landmarking.

Update: This paper is now published in Biometrical Journal.