plot.ntbft: Plotting the Net benefit function. Coule be multiple curves

View source: R/DCA.R

plot.ntbftR Documentation

Plotting the Net benefit function. Coule be multiple curves

Description

Plotting the Net benefit function. Coule be multiple curves

Usage

## 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"
)

Arguments

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

Examples

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


ProfessionalFarmer/loonR documentation built on Oct. 9, 2024, 9:56 p.m.