Survival – How to Calculate Time at Risk Using Cox Proportional Hazards in R

cox-modelrsurvival

Can you calculate the time at set risk from proportional hazard models?

Say I've got my model built for the whole population. The risk of developing an event in one year is 5%. After stratification, some patients have a higher risk, some lower.

How do I get a value, per patient, that will tell me the time at which they have a 5% risk of developing an event?

Apologies for not showing any code examples, I'm wondering if this is even possible. if it isn't, could you suggest other models?

Best Answer

You can think about this as a generalization of median survival, which is the (frequently reported) time when the probability of having experienced an event is 0.5. You can in principle ask for any quantile of a survival function from a model.

The time to 0.05 probability of having an event that you seek represents the time to 0.95 probability of survival. Depending on the software you might need to specify either 0.05 or 0.95 as the probability, so check the manual first. With the R quantile() method for survival curves produced by the survfit() function,

the argument prob of this function applies to the cumulative distribution function $F(t) = 1-S(t)$.

Thus you would specify probs = 0.05 with that software. The help page has an example of how to specify sets of covariate values and associated survival quantiles, along with confidence intervals, from a Cox model. That help page also describes the considerations when the desired survival probability coincides with a flat portion of the survival curve.

Related Question