pooledROC.BB {ROCnReg} | R Documentation |
Bayesian bootstrap estimation of the pooled ROC curve.
Description
This function estimates the pooled ROC curve using the Bayesian bootstrap estimator proposed by Gu et al. (2008).
Usage
pooledROC.BB(marker, group, tag.h, data,
p = seq(0, 1, l = 101), B = 5000, ci.level = 0.95, pauc = pauccontrol(),
parallel = c("no", "multicore", "snow"), ncpus = 1, cl = NULL)
Arguments
marker |
A character string with the name of the diagnostic test variable. |
group |
A character string with the name of the variable that distinguishes healthy from diseased individuals. |
tag.h |
The value codifying healthy individuals in the variable |
data |
Data frame representing the data and containing all needed variables. |
p |
Set of false positive fractions (FPF) at which to estimate the pooled ROC curve. |
B |
An integer value specifying the number of Bayesian bootstrap resamples. By default 5000. |
ci.level |
An integer value (between 0 and 1) specifying the level for the credible interval. The default is 0.95. |
pauc |
A list of control values to replace the default values returned by the function |
parallel |
A characters string with the type of parallel operation: either "no" (default), "multicore" (not available on Windows) or "snow". |
ncpus |
An integer with the number of processes to be used in parallel operation. Defaults to 1. |
cl |
An object inheriting from class |
Details
Estimates the pooled ROC curve (ROC) defined as
where
The method implemented in this function makes use of the equivalence (see Gu et al., 2008)
and estimates both and the outer probability using the Bayesian bootstrap resampling distribution.
Regarding the area under the curve, we note that
where . In our implementation, the expectation is computed using the Bayesian bootstrap (using the same weights as those used to estimate the pooled ROC). As far as the partial area under the curve is concerned, when
focus = "FPF"
and assuming an upper bound for the FPF, what it is computed is
where . Again, the expectation is computed using the Bayesian bootstrap. The returned value is the normalised pAUC,
so that it ranges from
(useless test) to 1 (perfect marker). Conversely, when
focus = "TPF"
, and assuming a lower bound for the TPF of , the partial area corresponding to TPFs lying in the interval
is computed as
where is a
rotation of the ROC curve, and it can be expressed as
. Thus
where , and the expectation is computed using the Bayesian bootstrap. The returned value is the normalised pAUC,
, so that it ranges from
(useless test) to 1 (perfect test).
Value
As a result, the function provides a list with the following components:
call |
The matched call. |
marker |
A list with the diagnostic test outcomes in the healthy (h) and diseased (d) groups. |
missing.ind |
A logical value indicating whether missing values occur. |
p |
Set of false positive fractions (FPF) at which the pooled ROC curve has been estimated. |
ci.level |
The value of the argument |
ROC |
Estimated pooled ROC curve, and corresponding |
AUC |
Estimated pooled AUC, and corresponding |
pAUC |
If computed, estimated partial area under the pooled ROC curve (posterior mean) and |
weights |
list with the Dirichlet weights (involved in the estimation) in the healthy (h) and diseased (d) groups. These are matrices of dimension n0 x B and n1 x B, where n0 is the number of healthy individuals and n1 is the number of diseased individuals. |
References
Gu, J., Ghosal, S., and Roy, A. (2008). Bayesian bootstrap estimation of ROC curve. Statistics in Medicine, 27, 5407–5420.
See Also
AROC.bnp
, AROC.sp
, AROC.kernel
, pooledROC.BB
, pooledROC.emp
, pooledROC.kernel
, pooledROC.dpm
, cROC.bnp
, cROC.sp
or AROC.kernel
.
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)
m0_BB <- pooledROC.BB(marker = "l_marker1", group = "status",
tag.h = 0, data = newpsa, p = seq(0,1,l=101), B = 5000)
summary(m0_BB)
plot(m0_BB)