Learn R Programming

ROCnReg (version 1.0-8)

plot.AROC: Default AROC plotting

Description

Takes a fitted AROC object produced by AROC.bnp(), AROC.sp(), or AROC.kernel() and plots the covariate-adjusted ROC curve (AROC) and associated area under the AROC (AAUC).

Usage

# S3 method for AROC
plot(x, main = NULL, ...)

Arguments

x

An object of class AROC as produced by AROC.bnp(), AROC.sp(), or AROC.kernel().

main

Character string with the overall title for the plot. If NULL, the default, the method used to estimate the AROC curve is depicted.

...

Further arguments passed to or from other methods.

See Also

AROC.bnp, AROC.sp or AROC.kernel

Examples

Run this code
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)
# \donttest{
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,l=101), compute.lpml = TRUE, compute.WAIC = TRUE,
compute.DIC = TRUE)

plot(AROC_bnp)
# }
# \dontshow{
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,l=101), compute.lpml = FALSE, compute.WAIC = FALSE,
compute.DIC = FALSE,
mcmc = list(nsave = 400, nburn = 100, nskip = 1))

plot(AROC_bnp)
# }

Run the code above in your browser using DataLab