Nomogram, also known as Nomogram, is based on regression analysis, uses multiple clinical indicators or biological attributes, and then uses line segments with scores to achieve the purpose of setting: based on multiple The value of the variable predicts the probability of a certain clinical outcome or a certain type of event. Nomogram can be used for multi-index joint diagnosis or prediction of disease incidence or progression.
In recent years, it has been used more and more in high-quality SCI clinical papers. The nomogram converts the regression model into an intuitive view, making the results easier to judge and readable. For example,
today we use hand-to-hand operations to teach you how to make such a nomogram based on COX regression. First, For the installation of R language 3.6 or above and the installation of RStudio, the installation process will not be explained in detail. Let's use the cancer database that comes with the survival package in R language as an example.
First open RStudio
and then load the data package.
library(survival)
library(rms)
and then import data
data(package=“survival”)
bc<-cancer
dc<-datadist(bc)
options(datadist=“dc”)
establish COX regression equation
f <- cph(Surv( time, status) ~ age + sex + ph.ecog + pat.karno +wt.loss,
x=T, y=T, surv=T, data=cancer, time.inc=36)
analyze the COX regression equation
summary (f)
Draw a nomogram
surv <- Survival(f)
nom <- nomogram(f, fun=list(function(x) surv(36, x), function(x) surv(60, x),
function(x) surv(120, x)), lp=F, funlabel=c(“3-year survival”, “5-year survival”, “10-year survival”),
maxscale=10, fun.at=c(0.95, 0.9, 0.85, 0.8, 0.75, 0.7, 0.6, 0.5))
plot(nom)
内部验证
validate(f, method=“boot”, B=1000, dxy=T)
rcorrcens(Surv(time, status) ~ predict(f), data = dc)
1-0.344=0.656,即为C-index
一致性检验
f3 <- cph(Surv(time, status) ~ age + sex + ph.ecog + pat.karno +wt.loss, x=T, y=T, surv=T,
data=bc, time.inc=36)
cal3 <- calibrate(f3, cmethod=“KM”, method=“boot”, u=36, m=220, B=1000)
plot(cal3)
f5 <- cph(Surv(time, status) ~age + sex + ph.ecog + pat.karno +wt.loss, x=T, y=T, surv=T,
data=bc, time.inc=60)
cal5 <- calibrate(f5, cmethod=“KM”, method=“boot”, u=60, m=220, B=1000)
plot(cal5)
f10 <- cph(Surv(time, status) ~ age + sex + ph.ecog + pat.karno +wt.loss, x=T, y=T, surv=T,
data=bc, time.inc=120)
cal10 <- calibrate(f10, cmethod=“KM”, method=“boot”, u=120, m=220, B=1000)
plot(cal10)
Step-by-step verification can be done according to requirements, and external verification will not be explained in detail. Those who are interested can follow my scientific research tutorial.
Move your little hands and pay attention, more wonderful articles are all in the zero-based scientific research