ntbft: Net benifit

View source: R/DCA.R

ntbftR Documentation

Net benifit

Description

Net benifit

Usage

ntbft(
  response,
  pred,
  xstart = 0.01,
  xstop = 0.99,
  step = 0.01,
  type = "treated",
  model.name = "Model",
  exterdt = NULL
)

Arguments

response

Should be 0 and 1

xstart

the starting point of the threshold probability, the default value is 0.01.

xstop

the end point of the threshold probability, the default value is 0.99

step

a numerical value specifying the incremental step of the threshold probability, the default value is 0.01

type

controls the type of net benefit to be computed. The allowed values correspond to the treated (“treated”), untreated (“untreated”) and overall (“overall”) patients, or to the ADAPT index (“adapt”). The default is the “treated”

exterdt

specify whether the prediction should be made in external dataset; this is useful for cross validation of the model. By default, the value is NULL, indicating the prediction is made in the same dataset as the training dataset

Examples

data(LIRI)

pred <- as.vector( unlist( LIRI[,c(3)] ) )
ntbft(LIRI$status, pred)


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