View source: R/survival_functions.R
KMplot | R Documentation |
Fit CoxPH (and Coxme) model with cluster labels and plot the KM curves Fit a CoxPH model and a Coxme model with the cluster labels obtained by hierarchical clustering of the computed JSD matrix
KMplot(ggsurvobject, HR, pval)
surv |
is a data.frame with a column named "SampleID" denoting the patient IDs, a column named "Survival.in.days" denoting the patient survival, a column named "Censored" denoting the censoring status, and a column named "Cluster" denoting the cluster label of thge patients found using JSD based hierarchical clusetring |
The function, coxPH_plot fits a CoxPH model with the cluster labels and plots the KM curves specific to the clusters accompanied by the estimated Hazard Ratio (HR) and the p-value for testing its significance. The function, coxme_model fits a CoxPH model with a random effects capturing the characteristics of the JSD matrix (Coxme model).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.