make_surv_table: Create a nice data frame from a survival model for...

View source: R/make_surv_table.R

make_surv_tableR Documentation

Create a nice data frame from a survival model for automatically generating a table.

Description

Create a nice data frame from a survival model for automatically generating a table.

Usage

make_surv_table(fit_surv, nround = 2, surv = TRUE, event = NULL)

Arguments

nround

integer indicating the number of decimal places (round) or significant digits (signif) to be used. Negative values are allowed

surv

TRUE/FALSE. Per defecte supervivencia TRUE, decreixent. FALSE indica cumulative events (f(y) = 1-y)

event

antic parametre

survobj

survfit object

Value

a data frame with labeled columns

Author(s)

Miriam Mota miriam.mota@vhir.org

Examples

data(aml)
surv_fit <-survfit(Surv(time = aml$time, event = aml$status) ~ 1)
stargazer(make_surv_table(surv_fit),
           summary = FALSE, type = c('latex'), title = 'Summary of status survival fit',
          rownames = FALSE)

miriamMota/mmotaF documentation built on Jan. 12, 2023, 4 a.m.