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

View source: R/crisk_multi.R

crisk_multiR Documentation

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)

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.

Value

a tibble of competing risk analysis output.

Examples

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)


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