Knowledge base

How to select best cutoff in survival plot

Introduction

The following are the codes for select best off of survival data.

Code exmaple

Example data table
dt:

          OS stat Response          pat_id      Expr
1:  4.632444    1       PD SAM7f0d9cc7f001 2.6627146
2:  1.412731    1       PD SAM4305ab968b90 0.2071656
3: 16.229979    1       PD SAMcf018fee2acd 2.2043672
4:  3.121150    1       PD SAMcc4675f394a1 1.1955449
5:  7.457906    1       PD SAM49f9b2e57aa5 1.0337993
library(survminer)
res.cut <- surv_cutpoint(dt, time = "OS", event = "stat",
                         variables = c("Expr"))
dt$Group <- factor(ifelse(dt$Expr > res.cut$cutpoint[1,1], "High", "Low"), levels = c("Low", "High"))

References

None

Original

None

Leave a Reply

Your email address will not be published. Required fields are marked *