I have predictions, which come from a survival model, this model gives me very low probabilities, and I am not sure if they fulfill the real probability of the phenomenon.

For example, I calculate $P\left( T\leq t+d \middle| T>t \right)$ and the probabilities are very low (with $d=180$).

To summarize, I need these probabilities to be on average another number (let's say $0.2$). Is it possible to create an artificial calibration with only this number (the desired average) as the input?

I have thought of creating a vector of size $n$ equal to the size of that distributes $X_i \sim Ber(p=0.2)$ and assign its ones to the top $np$ probabilities and its zeros to the latest $n(1-p)$. Which would result in a table with a column of probabilities obtained with the survival model and another column with an $0$ or $1$ depending on the said probability.

After getting this table, I would simply use CalibratedClassifierCV from scikit-learn. Is this the correct way?

  • 1
    $\begingroup$ What survival model are you using? $\endgroup$ Commented May 11, 2022 at 14:56
  • $\begingroup$ I am using Cox Proportional Hazards model. Calculating exp(-predict("expected")) with time = d+180 and the same with time = d $\endgroup$ Commented May 11, 2022 at 17:08
  • 1
    $\begingroup$ It sounds like you are looking for something like a Bayesian survival analysis to specify priors $\endgroup$ Commented May 11, 2022 at 18:22
  • $\begingroup$ Yes. Sound suitable, do you have any recommended bibliography? $\endgroup$ Commented May 12, 2022 at 1:02
  • $\begingroup$ The survival times should be distributed as $$Exp(\beta \cdot X)$$ to get constant rates. $\endgroup$
    – 42-
    Commented Jun 28, 2022 at 0:49

1 Answer 1


Sound like you are interested in controlling for some of the time varying coefficients in the Cox model using priors using Bayesian methods. Here are some references that might help you:

Bayesian Survival Analysis - COX PHD Time Varying Covariates Implementation This discusses the rstanarm package for R. Also refers to a Python version


Examples of how to use in R


Python Survival Analysis using PYMC3



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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