Description Usage Arguments Examples

View source: R/plot_functions_main.R

For a given population size, plot the number of subjects classified as high risk, and the number of subjects classified high risk with the outcome of interest at each high risk threshold.

1 2 3 4 5 6 | ```
plot_clinical_impact(x, population.size = 1000, cost.benefit.axis = TRUE,
n.cost.benefits = 6, cost.benefits, confidence.intervals, col = "black",
lty = 1, lwd = 2, xlim, ylim, xlab, ylab,
cost.benefit.xlab = "Cost:Benefit Ratio", legend.position = c("topright",
"right", "bottomright", "bottom", "bottomleft", "left", "topleft", "top",
"none"), ...)
``` |

`x` |
decision_curve object to plot. Assumes output from function 'decision_curve' |

`population.size` |
Hypothetical population size (default 1000). |

`cost.benefit.axis` |
logical (default TRUE) indicating whether to print an additional x-axis showing relative cost:benefit ratios in addition to risk thresholds. |

`n.cost.benefits` |
number of cost:benefit ratios to print if cost.benefit.axis = TRUE (default n.cost.benefit = 6). |

`cost.benefits` |
Character vector of the form c("c1:b1", "c2:b2", ..., "cn:bn") with integers ci, bi corresponding to specific cost:benefit ratios to print. Default allows the function to calculate these automatically. |

`confidence.intervals` |
logical indicating whether to plot confidence intervals. |

`col` |
vector of length two indicating the color for the number high risk and the second to the number high risk with outcome, respectively. |

`lty` |
vector of linetypes. The first element corresponds to the number high risk and the second to the number high risk with outcome. |

`lwd` |
vector of linewidths. The first element corresponds to the number high risk and the second to the number high risk with outcome. |

`xlim` |
vector giving c(min, max) of x-axis. Defaults to c(min(thresholds), max(thresholds)). |

`ylim` |
vector giving c(min, max) of y-axis. |

`xlab` |
label of main x-axis. |

`ylab` |
label of y-axis. |

`cost.benefit.xlab` |
label of cost:benefit ratio axis. |

`legend.position` |
character vector giving position of legend. Options are "topright" (default), "right", "bottomright", "bottom", "bottomleft", "left", "topleft", "top", or "none". |

`...` |
other options directly send to plot() |

1 2 3 4 5 6 7 8 9 10 | ```
#'data(dcaData)
set.seed(123)
baseline.model <- decision_curve(Cancer~Age + Female + Smokes,
data = dcaData,
thresholds = seq(0, .4, by = .001),
bootstraps = 25) #should use more bootstrap replicates in practice!
#plot the clinical impact
plot_clinical_impact(baseline.model, xlim = c(0, .4),
col = c("black", "blue"))
``` |

mdbrown/DecisionCurve documentation built on July 22, 2018, 8:07 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.