KMplot: Fit CoxPH (and Coxme) model with cluster labels and plot the...

View source: R/survival_functions.R

KMplotR 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

Description

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

Usage

KMplot(ggsurvobject, HR, pval)

Arguments

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

Value

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).


sealx017/DenVar documentation built on July 22, 2024, 8:57 p.m.