# Calculating fraction of new information in Cox proportional hazard models

Hello,

In continuation to the topic we discussed today in our workshp, in regard to the blog post about calculation of the added predictive information by a biomarker:

The example mentioned in the blog post, calculates the added predictive information of a biomarker in a Binary Logistic Model.
The example given, tries to assess the added information of a new biomarker (cholesterol) to a base model.

The formula to calculate the added information is:
fraction of new information= 1- variance(pre)/variance(post)

I will attach here the code used to calculate the variance of the model with the biomarker:

g <- lrm(sigdz ~ rcs(age,4) * sex + rcs(choleste,4) + rcs(age,4) %ia%
rcs(choleste,4), data=acath) # This is the basemodel+biomarker
post <- predict(g, type='fitted')   # post-test probability
variance <- round(var(post), 3)


Summary

This text will be hidden

I tried to do the same calculations for a Cox proportional hazard model, would like to get feedback on the code/approach if that is possible:

I am attaching a hypothetical example, I am using a different package (that is the one I used at the time, would be happy to learn other ways of doing the calculations using the rms package)

Model <- coxph(Surv(surv_time, event) ~ biomarker+ variable1+variable2, data =mydata) # The base model+biomarker

# In to the predict the survival probability I am using exp(-expected), ref: https://cran.r-project.org/web/packages/survival/survival.pdf (page 86-87)

model_prediction <- predict(Model , type="expected")
model_prob <- exp(-model_predicton )

model_variance <- round(var(model_prob), 3)

Summary

This text will be hidden

I think my question is, how can I calculate the probability for the outcome in cox model?

I hope I am being clear enough!

I’m not clear that expected survival is the right metric, and why \exp(-x) is used.

A general issue is choosing a scale for the calculation of the variance of predictions. For binary logistic model I’ve seen more expected results by computing on the probability scale, i.e., running the expit transformation on X\hat{\beta}. For the Cox model it is very easy to compute the variance on X\hat{\beta} which is also nice in not requiring you to choose a time. For a probability scale you have to choose a time u and estimate \Pr(Y \geq u | X) for every subject. This is easy with the rms package cph and survest functions and also with Predict(..., time=).

It’s worth also taking the simpler approach of using R^{2}_\text{adj} using this.