ms_surv: Survival function, hazard and density of an endpoint

View source: R/ms_surv.R

ms_survR Documentation

Survival function, hazard and density of an endpoint

Description

Evaluates the distribution of progression-free survival or overall survival implied by an ms_model, without dropout.

Usage

ms_surv(model, time, endpoint = c("os", "pfs"))

Arguments

model

An ms_model object.

time

Times since randomization (nonnegative).

endpoint

"os" or "pfs".

Details

PFS has the hazard prog + death. OS combines death before progression with death after progression, with or without switch; its hazard is not piecewise constant when prog is positive. With a switch before progression (switch_pre), PFS is the time to progression or death whatever pfs_switch of ms_scenario, and its hazard is not piecewise constant.

Value

A data frame with time, the survival function surv, the hazard haz (NA where surv is 0) and the density dens.

See Also

ms_model, ms_prob

Examples

m <- ms_fleischer(median_pfs = 6, median_os = 15)
ms_surv(m, time = c(6, 15), endpoint = "os")


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