0
$\begingroup$

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?

$\endgroup$
5
  • 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

3
$\begingroup$

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

https://stats.stackexchange.com/questions/510468/bayesian-survival-analysis-cox-phd-time-varying-covariates-implementation

Examples of how to use in R

https://cran.r-project.org/web/packages/rstanarm/vignettes/rstanarm.html

Python Survival Analysis using PYMC3

https://docs.pymc.io/en/v3/pymc-examples/examples/survival_analysis/survival_analysis.html#:~:text=Bayesian%20Survival%20Analysis%C2%B6&text=Survival%20analysis%20studies%20the%20distribution,model%20in%20Python%20using%20PyMC3.

$\endgroup$

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.