pauccontrol: Partial area under the...

View source: R/pauccontrol.R

pauccontrolR Documentation

Partial area under the covariate-adjusted/covariate-specific/pooled ROC curve

Description

Used to set various parameters controlling the estimation of the partial area under the covariate-adjusted/covariate-specific/pooled ROC curve .

Usage

pauccontrol(compute = FALSE, focus = c("FPF", "TPF"), value = 1)

Arguments

compute

Logical value. If TRUE the partial area under the covariate-adjusted/covariate-specific/pooled ROC curve is estimated.

focus

Whether computation should be done over a restricted range of false positive fractions (FPF) or a restricted range of true positive fractions (TPF).

value

Numeric value. Pre-specified upper bound for the FPF (if focus = "FPF") or lower bound for the TPF (if focus = "TPF").

Details

The value returned by this function is used as a control argument of the AROC.bnp, AROC.sp, AROC.kernel, cROC.bnp, cROC.sp, cROC.kernel functions.

Value

A list with components for each of the possible arguments.

See Also

AROC.bnp

Examples

library(ROCnReg)
data(psa)
# Select the last measurement
newpsa <- psa[!duplicated(psa$id, fromLast = TRUE),]

# Log-transform the biomarker
newpsa$l_marker1 <- log(newpsa$marker1)

# Covariate for prediction
agep <- seq(min(newpsa$age), max(newpsa$age), length = 5)
df.pred <- data.frame(age = agep)


cROC_sp_normal <- cROC.sp(formula.h = l_marker1 ~ age,
                          formula.d = l_marker1 ~ age,
                          group = "status", 
                          tag.h = 0,
                          data = newpsa,
                          newdata = df.pred,
                          est.cdf = "normal",
                          pauc = list(compute = TRUE, value = 0.5, focus = "FPF"),
                          p = seq(0, 1, l = 101), 
                          B = 10)



ROCnReg documentation built on March 31, 2023, 5:42 p.m.