densitycontrol.aroc: Conditional density estimates of test outcomes in the healthy...

View source: R/densitycontrol.aroc.R

densitycontrol.arocR Documentation

Conditional density estimates of test outcomes in the healthy population

Description

This function is used to set various parameters controlling the estimation of the conditional densities of test outcomes in the healthy group.

Usage

densitycontrol.aroc(compute = FALSE, grid.h = NA, newdata = NA)

Arguments

compute

Logical value. If TRUE the conditional densities of test outcomes in the healthy group are estimated.

grid.h

Grid of test outcomes in the healthy group where the conditional density estimates are to be evaluated. Value NA signals autoinitialization, with default a vector of length 200 in the range of test outcomes in the healthy group.

newdata

Data frame containing the values of the covariates at which the conditional density estimates are computed.

Details

The value returned by this function is used as a control argument of the AROC.bnp function.

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)


AROC_bnp <- AROC.bnp(formula.h =  l_marker1 ~ f(age, K = 0),
                     group = "status", 
                     tag.h = 0,
                     data = newpsa,
                     standardise = TRUE,
                     p = seq(0, 1, len = 101),
                     compute.lpml = TRUE,
                     compute.WAIC = TRUE,
                     compute.DIC = TRUE,
                     pauc = pauccontrol(compute = TRUE, value = 0.5, focus = "FPF"),
                     density = densitycontrol.aroc(compute = TRUE, grid.h = NA, newdata = df.pred),
                     mcmc = mcmccontrol(nsave = 500, nburn = 100, nskip = 1)
)



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