| ms_prob | R Documentation |
Probabilities of being in each state of the multistate model at given times since randomization, without dropout.
ms_prob(model, time)
model |
An |
time |
Times since randomization (nonnegative). |
The probability of being progression-free and alive is
exp(-H(t)), where H is the cumulative hazard of progression and
death. The probabilities of the progressed and switched states are
integrals over the time of progression of the progression density times
the transition probabilities after progression, which have closed forms
for piecewise constant intensities. The integrals are computed with
Gauss-Legendre rules. With a switch before progression, the probability
of the switched progression-free state also has a closed form, and the
switched state includes the patients who progressed after such a switch.
A data frame with time and the probabilities
progression_free, progressed (without switch),
switched and dead. With switch_pre positive in
some interval, progression_free is the probability of being
progression-free without a switch, and the column
progression_free_switched (progression-free after a switch
before progression) follows it.
ms_model, ms_surv
m <- ms_model(time = c(0, 6), prog = c(0.10, 0.08), death = 0.01,
death_prog = 0.05, switch_prob = 0.3, death_switch = 0.03)
ms_prob(m, time = c(6, 12, 24))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.