ms_prob: State occupation probabilities

View source: R/ms_prob.R

ms_probR Documentation

State occupation probabilities

Description

Probabilities of being in each state of the multistate model at given times since randomization, without dropout.

Usage

ms_prob(model, time)

Arguments

model

An ms_model object.

time

Times since randomization (nonnegative).

Details

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.

Value

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.

See Also

ms_model, ms_surv

Examples

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))


DesignComplexSurvival documentation built on Nov. 23, 2026, 5:07 p.m.