- Notifications
You must be signed in to change notification settings - Fork16
Decision Curve Analysis
License
Unknown, MIT licenses found
Licenses found
ddsjoberg/dcurves
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Diagnostic and prognostic models are typically evaluated with measuresof accuracy that do not address clinical consequences. Decision-analytictechniques allow assessment of clinical outcomes but often requirecollection of additional information and may be cumbersome to apply tomodels that yield a continuous result. Decision curve analysis is amethod for evaluating and comparing prediction models that incorporatesclinical consequences, requires only the data set on which the modelsare tested, and can be applied to models that have either continuous ordichotomous results.
Thedcurves package includes methods for evaluating predictivemodels with binary (Vickers and Elkin 2006) and time-to-event endpoints(Vickers et al. 2008). The package also includes methods for modelevaluation in the case-control setting (Pfeiffer and Gail 2020).
You can install dcurves fromGitHub with:
# install.packages("devtools")devtools::install_github("ddsjoberg/dcurves")
Assess models predicting binary endpoints.
library(dcurves)dca(cancer~cancerpredmarker+famhistory,data=df_binary,thresholds= seq(0,0.35,by=0.01),label=list(cancerpredmarker="Prediction Model",famhistory="Family History")) %>% plot(smooth=TRUE)
Time-to-event or survival endpoints
dca(Surv(ttcancer,cancer)~cancerpredmarker,data=df_surv,time=1,thresholds= seq(0,0.50,by=0.01),label=list(cancerpredmarker="Prediction Model")) %>% plot(smooth=TRUE)
Create a customized DCA figure by first printing the ggplot code. Copyand modify the ggplot code as needed.
gg_dca<- dca(cancer~cancerpredmarker,data=df_binary,thresholds= seq(0,0.35,by=0.01),label=list(cancerpredmarker="Prediction Model")) %>% plot(smooth=TRUE,show_ggplot_code=TRUE)#> # ggplot2 code to create DCA figure -------------------------------#> as_tibble(x) %>%#> dplyr::filter(!is.na(net_benefit)) %>%#> ggplot(aes(x = threshold, y = net_benefit, color = label)) +#> stat_smooth(method = "loess", se = FALSE, formula = "y ~ x",#> span = 0.2) +#> coord_cartesian(ylim = c(-0.014, 0.14)) +#> scale_x_continuous(labels = scales::percent_format(accuracy = 1)) +#> labs(x = "Threshold Probability", y = "Net Benefit", color = "") +#> theme_bw()
Pfeiffer, Ruth M, and Mitchell H Gail. (2020) “Estimating the DecisionCurve and Its Precision from Three Study Designs.”Biometrical Journal62 (3): 764–76.
Vickers, Andrew J, Angel M Cronin, Elena B Elkin, and Mithat Gonen.(2008)“Extensions to Decision Curve Analysis, a Novel Method forEvaluating Diagnostic Tests, Prediction Models and Molecular Markers.”BMC Medical Informatics and Decision Making 8 (1): 1–17.
Vickers, Andrew J, and Elena B Elkin. (2006) “Decision Curve Analysis: ANovel Method for Evaluating Prediction Models.”Medical DecisionMaking 26 (6): 565–74.
About
Decision Curve Analysis
Topics
Resources
License
Unknown, MIT licenses found
Licenses found
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.

