Learn R Programming

survout (version 0.1.0)

crisk_con: Modify the Output for Uni-variable and Multi-variable Competing Risk Analysis (Continuous and Ordinal Only)

Description

This function generates a table of competing risk analysis result with HR (95% Confidence Interval),P value.

Usage

crisk_con(csurv, cevent, cvars, gnames)

Value

a dataframe containing HRs (with 95% Confidence Intervals) and P values

Arguments

csurv

the duration of follow-up time in months.

cevent

the status indicator, which is generally 0 = alive, 1 = event, 2 = other event

cvars

a matrix, which has the variables' values (continuous and ordinal only)

gnames

a text vector, which are the names of the variables.

Examples

Run this code
Dat <- MASS::Melanoma
Dat$time <- Dat$time/30.5
X      <- cbind(Dat$age, Dat$thickness)
Gnames <- c('age', 'thickness')
output <- crisk_con(Dat$time, Dat$status, X, Gnames)

Run the code above in your browser using DataLab