Learn R Programming

heemod (version 0.8.0)

get_probs_from_surv: Extract Transition Probabilities from a Survival Model

Description

Get probabilities from survival models.

Usage

get_probs_from_surv_(x, ...)

# S3 method for flexsurvreg get_probs_from_surv_(x, cycle, km_limit = 0, cycle_length = 1, type = c("prob", "surv"), ...)

# S3 method for surv_dist get_probs_from_surv_(x, cycle, km_limit = 0, cycle_length = 1, type = c("prob", "surv"), ...)

get_probs_from_surv(x, ...)

Arguments

x
Either a result from flexsurvreg or define_survival.
...
arguments passed to methods.
cycle
The markov_cycle or state_time for which to predict.
km_limit
Up to what time should Kaplan-Meier estimates be used? Model predictions will be used thereafter. See Details.
cycle_length
The value of a Markov cycle in absolute time units.
type
either prob, for transition probabilities, or surv, for survival

Value

Returns the Markov transition probability for the cycles.

Details

If use_km_until = 0, then only model probabilities will be used. The results of get_probs_from_surv are memoised for options("heemod.memotime") (default: 1 hour) to increase resampling performance.