Learn R Programming

survout (version 0.1.0)

crisk_multi: Modify the Output for a Multi-variable Competing Risk Analysis .

Description

Create a table with the general multi-variable competing risk analysis results, including the HR (95 percent CI), P value.

Usage

crisk_multi(dat, csurv, cevent, convars = NULL, catvars = NULL)

Value

a tibble of competing risk analysis output.

Arguments

dat

a data.frame in which to interpret the variables.

csurv

this is the follow up time.

cevent

the status indicator, normally 0=alive, 1=dead.

convars

a vector of con variable names.

catvars

a vector of cat variable names.

Examples

Run this code
Dat <- MASS::Melanoma
Dat$time <- Dat$time/30.5
con_var <- c("age","thickness")
cat_var <- c("sex","ulcer")
multi_out <- crisk_multi(Dat, "time", "status", catvars = cat_var, convars =con_var)

Run the code above in your browser using DataLab