4
$\begingroup$

I am currently working through a survival problem and I wanted to get some advice with how to proceed.

I wanted to estimate survival probabilities over time based on knowing only the $\log({\rm hazard})$ which takes the form of powers of $t$. For example: $\ln({\rm hazard}(t)) = -5 + 1.2t^2 + 0.5t$

I've read elsewhere that this obtains an analytically intractable integral and thus requires numerical techniques.

Essentially I am looking to obtain a formula which predicts survival over time based on this hazard. Can anyone give me a heads-up about how I proceed with this? Does anyone know of a function in R that may help with the problem?

$\endgroup$
0

1 Answer 1

2
$\begingroup$

Survival probability $S(t) = Pr(T > t) = exp(-\int_0^t h(u) du)$.

In R, you can use function integrate:

h <- function(t) exp(-5 + 1.2*t^2 + 0.5*t)

and the survival probability

t <- 2
exp(-integrate(h, 0, t)$value)
$\endgroup$
0

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.