Determine optimal cutpoints for numerical variables in survival plots
Marcin Kosiński
[This article was first published on http://r-addict.com, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
The often demand in the biostatistical research is to group patients depending on explanatory variables that are continuous. In some cases the requirement is to test overall survival of the subjects that suffer on a mutation in specific gene and have high expression (over expression) in other given gene. To visualize differences in the Kaplan-Meier estimates of survival curves between groups, first the discretization of continuous variable is performed. Problems caused by categorization of continuous variables are known and widely spread (Harrel, 2015), but in this case there appear a simplification requirement for the discretization. In this post I present the maxstat(maximally selected rank statistics) statistic to determine the optimal cutpoint for continuous variables, which was provided it in the survminer package by Alboukadel Kassambara kassambara.
< !-- Place this tag in your head or just before your close body tag. -->
< !-- Place this tag where you want the button to render. -->
In this post I will use data from TCGA study, that are provided in the RTCGA package Star and survminerStar package to determine the optimal cutpoint for continuous variable.
I wrote about TCGA datasets and their preprocessing in my earlier posts: RTCGA factory of R packages – Quick Guide and BioC 2016 Conference Overview and Few Ways of Downloading TCGA Data. If your are not familiar with RTCGA family of data packages, you can visit the RTCGA website. Below I join survival information with ABCD4|5826 gene expression for patients suffering from BRCA (breast cancer) and HNSC (head and neck cancer). It can be done due to bcr_patient_barcode column which identifies each patient.
Joining survival times and ABCD4 gene’ expression.
13 patients have clinical info but they do not have expression information so I remove them from the analysis.
The complete data used for further analysis is printed below