Learn R Programming

survout (version 0.1.0)

surv_uni_con: 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)

Value

a tibble of survival results.

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.

Examples

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

Run the code above in your browser using DataLab