Below is code to implement decision curve analysis (Med Decis Making 2006 Nov-Dec;26(6):565-74) in Stata (version 8 or higher) and R.
Stata code
The "ado" files contain the actual code; the "hlp" files contain instructions. Save these files to the "ado" folder on your C drive, restart Stata (or type "discard" at the command line), and then type "help dca" or "help stdca" on the command line to see how to use the command.
Decision curve analysis for a binary endpoint (download dca.ado and dca.hlp)
Decision curve analysis for a survival-time outcome (download stdca.ado and stdca.hlp)
R code
The "R" file contains the actual code; the "doc" file contains instructions. Save the "R" file onto your computer, and then source the R code to use the function.
Decision curve analysis for a binary endpoint (download dca.Rand instructions for dca in R.doc)
Decision curve analysis for a survival-time outcome (download stdca.R and instructions for stdca in R.doc)