surv_uni_con: Modify the Survival Output for a Continuous Variable.

View source: R/surv_uni_con.R

surv_uni_conR Documentation

Modify the Survival Output for a Continuous Variable.

Description

This function generates a table with the general survival analysis results, including the number of total patients, the number of events, the P value, the AIC, and the C index. This function just modifies the output table's format.

Usage

surv_uni_con(dat, stime, sevent, svar, report_index = FALSE)

Arguments

dat

a data.frame.

stime

the duration of follow-up time in months.

sevent

the status indicator, which is generally 0 = alive, 1 = dead.

svar

a variable name.

report_index

logical value indicating if to report the show AIC and C index.

Value

a tibble of survival results.

Examples

Dat <- survival::lung
surv_uni_con(Dat, "time", "status", "age",report_index = TRUE)

SophiaJia/Survout documentation built on Oct. 1, 2022, 9:52 p.m.