Closed Karenou closed 4 years ago
Hi,
The two formulas are equivalent. We can rewrite your first formula in terms of S(t)
giving
S(t) = [1 - h(t)] * S(t-1) = [1 - h(t)] * [1 - h(t-1)] * [1 - h(t-2)] * ... * [1 - h(0)]
This is what is computed in predict_surv
, but for numerical stability we instead compute the sum of the log values.
a * b = exp[log(a*b)] = exp[log(a) + log(b)]
.
Does this clear things up?
Thank you very much! It is clear to me now.
Hi, I wonder if I could ask about the transformation from predicted survival probability to hazard rates using MTLR model.
In discrete-time model such as
MTLR
, could we simply apply this formulah(t) = ( S(t-1) - S(t) ) / S(t-1)
to transform the predicted survival probability to hazard rate in specific time interval?But in the below implementation in
class LogisticHazard(models.base.SurvBase)
inpycox.models
, the transformation from hazard to survival function is a bit different from the formula above. May I know which one should I adopt in discrete-time models when the predicted survival probability is already discretized by time interval?Many thanks!