define_surv_fit: Define a Fitted Survival Model

View source: R/survival_define.R

define_surv_fitR Documentation

Define a Fitted Survival Model

Description

Define a fitted survival models with a Kaplan-Meier estimator or parametric distributions

Usage

define_surv_fit(x)

Arguments

x

a survfit or flexsurvreg object

Value

A surv_object object.

Examples


library(survival)

define_surv_fit(
  survfit(Surv(time, status) ~ 1, data = colon)
)

define_surv_fit(
  flexsurv::flexsurvreg(Surv(time, status) ~ 1, data = colon, dist = "exp")
)


heemod documentation built on May 29, 2024, 8:17 a.m.