plot.ntbft | R Documentation |
Plotting the Net benefit function. Coule be multiple curves
## S3 method for class 'ntbft'
plot(
nb,
nolines = 2:dim(nb)[2],
nobands = NULL,
ymin = -0.1,
ymax = max(nb[, c(nolines, nobands)], na.rm = T),
legpos = c(0.9, 0.8),
palette = "aaas"
)
nb |
Object from |
nolines |
the number of the columns of nb which should be plotted using lines. The default is to plot all columns (except the first one containing the threshold). |
nobands |
the number of the columns of nb which should be plotted using bands (useful to plot confidence intervals). The default is to plot no bands |
legpos |
a vector of two coordinates indicating where the legend should be in the graph |
palette |
p = loonR::decisionCurveAnalysisSimple(label, risk)
p$Plot
v.netbenefit = p$NetBenefit
# similar to getr.netbenefit
nb <- data.frame(threshold = v.netbenefit$threshold,
All = v.netbenefit$All,
None = v.netbenefit$None,
`Transcriptomic panel` = v.netbenefit$Model,
`Risk-stratification model` = r.netbenefit$Model,
stringsAsFactors = F,
check.names = F)
p = loonR:::plot.ntbft(nb, 2:5)
p
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.