1
$\begingroup$

I have fit an extended cox model in R (i.e., some of the covariates change with time), and am now interested in predicting, for the censored observations, the probability that they will survive an additional year. I am fine with kaplan-meier survival curve estimates, and if needed, smoothed estimates for the hazard.

How would I go about getting these probability predictions? Tools for doing this and/or a theoretical understanding of how to do it would be helpful to me.

$\endgroup$
2
$\begingroup$

Perhaps the Cox-predicted survival curve could help you. Example follows. It does work with the extended Cox model.

install.packages("survMisc"); library(survMisc); library(survival)

# Fit a model, stratified by the variable you wish to predict upon
fits <- coxph(Surv(time, status==2) ~ age + strata(sex), data=lung)

# What is the age-adjusted survival for each sex? A prediction...
autoplot(autoplot(survfit(fits, newdata=data.frame(age=mean(lung$age, na.rm=T), legTextSize = 14, legLabSize = 14, legTitle='', axisLabSize = 14, tabTitle = "Number at risk", title="Adjusted survival by sex", xlab="Time (years)", ylab="Probability of survival", nRiskSize=5, censSize=0))))

enter image description here

$\endgroup$
0
$\begingroup$

Say a person you want to predict for is censored at time $c_1$. You are interested in the predicted survival from that point on, so on $S(w) = P(T>c_1+w| T>c_1)$. Then denote $c_1$ as a landmark time and:

  1. create a landmark data set, where time point $c_1$ becomes the new time $0$. In this data set you want to keep only the persons who are still at risk at $c_1$, and discard all information on the past.
  2. Fit the same (Cox) model on this data set. The predicted survival curve from this data set, for the subject that you are interested in (the one censored at $c_1$), is the quantity of interest (you can select the value at 1 year after that). Having a time-dependent covariate should not be a problem. For this subject you can use the last observed value.
  3. Then repeat the procedure for all the censoring time points.

There are two packages in R which can do the splitting of the data set (dynpred and mstate) but it wouldn't be very complicated to implement a function like that yourself.

For more theoretical explanations about this, a reference book is Dynamic Prediction in Clinical Survival Analysis by Hans van Houwelingen and Hein Putter, in this paper or there are a bunch of presentations that I just found online with Google, such as this one.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.