Learn R Programming

hesim (version 0.2.3)

params_joined_surv: Parameters of joined survival models

Description

Create a list containing the parameters of survival models joined at specified time points. See joined for more details.

Usage

params_joined_surv(..., times)

Arguments

...

Objects of class params_surv, which can be named.

times

A numeric vector of times at which to join models.

Value

An object of class "params_joined_surv", which is a list containing two elements:

models

A list of params_surv objects from each statistical model to be joined.

times

Equivalent to the argument times.

Examples

Run this code
# NOT RUN {
library("flexsurv")
fit_exp <- flexsurv::flexsurvreg(formula = Surv(futime, fustat) ~ 1, 
                                 data = ovarian, dist = "exp")
fit_wei <- flexsurv::flexsurvreg(formula = Surv(futime, fustat) ~ 1, 
                                 data = ovarian, dist = "weibull")
params_surv_exp <- create_params(fit_exp, n = 2)
params_surv_wei <- create_params(fit_wei, n = 2)
params_joined_surv <- params_joined_surv(exp = params_surv_exp,
                                         wei = params_surv_wei,
                                         times = 3)
print(params_joined_surv)
# }

Run the code above in your browser using DataLab