Teach you how to use R language to make clinical decision curve

DCA (Decision Curve Analysis) clinical decision curve is a method used to evaluate the diagnostic accuracy of a diagnostic model. It was created by Dr. Andrew Vickers in 2006. We usually judge a disease like to use the AUC value of the ROC curve to determine the accuracy of the model. However, the ROC curve is usually evaluated by specificity and sensitivity. In actual clinical practice, we should also consider the impact of false positives and false negatives on patients. Therefore, the concepts of threshold probability and net benefit are introduced into the DCA curve.
Insert picture description here
Picture source article: Urinary Podocalyxin as a Biomarker to Diagnose Membranous Nephropath mainly talks about the use of the kidney marker uPCXμgg to diagnose membranous nephropathy. The abscissa of this figure is the threshold probability, and the ordinate is the net benefit. When uPCXμgg reaches a certain value, the probability of renal disease in the patient model is recorded as Pi; when Pi reaches a certain threshold (denoted as Pt), it is defined as positive.
The concept of net benefit, net benefit refers to the proportion of gains from the operation + the proportion of unprofitable weights
Insert picture description here

Insert picture description here
after measures are carried out at this probability . The algorithm of the net benefit in the decision curve is as follows: (Table source: clinical epidemiology and evidence-based medicine) Let’s take a look at the basic calculation of the decision curve analysis through a specific four grid table. Assuming that the threshold probability is 10%, we get The following four grid table (table source: clinical epidemiology and evidence-based medicine): According to the above 10% threshold, we judged 23 people correctly, and we judged 10 people wrong. At this time our net benefit = (23/100)-[(10/100) (0.1/0.9)] = 0.218. Similarly, we can calculate the net benefit value when the threshold probability is 11%, and the net benefit value when the threshold probability is 12%. By analogy, we can obtain a one-to-one correspondence between the threshold probability and the net benefit value, and we can draw this relationship as a line graph, which is the decision curve.
Let's use R language to make DCA curve
The author’s own data is attached to the Urinary Podocalyxin as a Biomarker to Diagnose Membranous Nephropath article, so we use the author’s data to make a DCA curve. At present, using R language to make DCA curve requires the rmda package, which must be downloaded first. The DecisionCurve package and stdca package of some online tutorials have been officially removed by R. The normal way cannot be downloaded. The code for making DCA curve and DecisionCurve package of the rmda package It's almost the same.
Let’s use the R language to import the data to see a
Insert picture description here
lot of data. These are only part of the data, but the author only uses MN (membranous nephropathy) age (age) + eGFR (glomerular filtration rate) + DM (diabetes) + uPCXμgg (Kidney Marker) These indicators, the
Insert picture description here
author divided the age and glomerular filtration rate by 10 before making the model. Here we have to deal with it.

be$age1<-be$age/10
be$eGFR1<-be$eGFR/10

Insert picture description here
The author made 3 models uPCX (single use of kidney markers), clinicalparameters (single use of clinical indicators), all (markers + clinical indicators).
We also made 3 models respectively like him

uPCX<- decision_curve(MN~uPCXμgg,data = be, 
family = binomial(link ='logit'),#模型类型,这里是二分类
                        thresholds= seq(0,1, by = 0.01),
                        confidence.intervals =0.95,#95可信区间
study.design = 'cohort')#研究类型,这里是队列研究

Make the other two models in the same way

clinicalparameters<- decision_curve(MN~age1+eGFR1+DM,data = be, family = binomial(link ='logit'),
                                    thresholds= seq(0,1, by = 0.01),
                                    confidence.intervals =0.95,study.design ='cohort')
all<- decision_curve(MN~age1+eGFR1+DM+uPCXμgg,data = be,
                                    family = binomial(link='logit'),
                                    thresholds= seq(0,1, by = 0.01),
                                    confidence.intervals =0.95,study.design ='cohort')

Use the LIST function to connect the 3 models

List<-list(uPCX,clinicalparameters,all)

Final drawing

plot_decision_curve(List,curve.names= c('uPCX','clinicalparameters','all'),
                    cost.benefit.axis =FALSE,col = c('red','blue','green'),
                    confidence.intervals =FALSE,standardize = FALSE)

Insert picture description here
The graph comes out, exactly the same as the one made by the author. The two dotted lines in the figure, the diagonal line represents the case of all positives, the horizontal line represents the case of all negatives, our model must be higher than the all positives Slash, otherwise it doesn't make much sense. We can see that between the 0.45-0.6 threshold probability, the net benefit of the ALL model is significantly higher than the other two models.
It's actually very simple, have you made it? Friends who need a zero foundation to learn SPSS can follow our scientific research tutorials.
References

  1. Imaizumi T, Nakatochi M, Akiyama S, et al. Urinary Podocalyxin as a Biomarker to Diagnose Membranous Nephropathy. PLoS One. 2016;11(9):e0163507. Published 2016 Sep 26. doi:10.1371/journal.pone.0163507
  2. The ROC curve is old, come and watch the DCA curve of the newcomers https://mp.weixin.qq.com/s/Wb7OGteSrEJENVfeDFJ82g
  3. Introduction to decision curve analysis https://www.iikx.com/news/statistics/1622.html
    Insert picture description here

Guess you like

Origin blog.csdn.net/dege857/article/details/112461198