powered by
This function generates a table of competing risk analysis result with HR (95% Confidence Interval),P value.
crisk_con(csurv, cevent, cvars, gnames)
a dataframe containing HRs (with 95% Confidence Intervals) and P values
the duration of follow-up time in months.
the status indicator, which is generally 0 = alive, 1 = event, 2 = other event
a matrix, which has the variables' values (continuous and ordinal only)
a text vector, which are the names of the variables.
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