Diagnostic and prognostic models are typically evaluated with measures of accuracy that do not address clinical consequences. Decision-analytic techniques allow assessment of clinical outcomes but often require collection of additional information and may be cumbersome to apply to models that yield a continuous result. Decision curve analysis is a method for evaluating and comparing prediction models that incorporates clinical consequences, requires only the data set on which the models are tested, and can be applied to models that have either continuous or dichotomous results.
You can install dca from GitHub with:
# install.packages("devtools") devtools::install_github("ddsjoberg/dca")
This is a basic example which shows you how to solve a common problem:
library(MASS) library(dca) data.set <- birthwt model = glm(low ~ age + lwt, family=binomial(link="logit"), data=data.set) data.set$predlow = predict(model, type="response") results = dca(data=data.set, outcome="low", predictors=c("age", "lwt"), probability=c("FALSE", "FALSE")) #>  "age converted to a probability with logistic regression. Due to linearity assumption, miscalibration may occur." #>  "lwt converted to a probability with logistic regression. Due to linearity assumption, miscalibration may occur."
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.