trinROC.test {trinROC} | R Documentation |
Trinormal based ROC test
Description
A statistical test function to assess three-class ROC data. It is possible to investigate a single classifier or make a comparison of two independent / correlated classifiers.
Usage
trinROC.test(
x1,
y1,
z1,
x2 = 0,
y2 = 0,
z2 = 0,
dat = NULL,
paired = FALSE,
conf.level = 0.95
)
Arguments
x1 , y1 , z1 |
(non-empty) numeric vectors of data from the healthy, intermediate and diseased class from Classifier 1. |
x2 , y2 , z2 |
numeric vectors of data from the healthy, intermediate and diseased class from Classifier 2. |
dat |
a data frame of the following structure: The first column represents a factor with three levels, containing the true class membership of each measurement. The levels are ordered according to the convention of higher values for more severe disease status. The second column contains all measurements obtained from Classifier 1 (in the case of single marker assessment). In the case of comparison of two markers, column three contains the measurementss from the Classifier. |
paired |
a logical indicating whether data arose from a paired setting.
If |
conf.level |
confidence level of the interval. A numeric value between (0,1)
yielding the significance level |
Details
The trinormal ROC model is a parametric model in three-class ROC
analysis. It is based on normality in each of the trhee classes D_-
(healthy), D_0 (intermediate) and D_+ (diseased) with denoted distributions
N(\mu_-,\sigma_-^2)
, N(\mu_0,\sigma_0^2)
and
N(\mu_+,\sigma_+^2)
. A classifier of a trinormal ROC model classifies
individuals into one of the three ordered classes based on two cut-off points
c_- < c_+
. We define t_-=F_-(c_-)
and t_+
=1-F_+(c_+)=G_+(c_+)
. Now, the ROC surface can be written as
ROCs(t_-,t_+) = \Phi \left(\frac{\Phi^{-1} (1-t_+) +d}{c} \right) -
\Phi \left(\frac{\Phi^{-1} (t_-)+b}{a} \right)
whith parameters a, b, c and c given by a =
\frac{\hat{\sigma}_0}{\hat{\sigma}_-}, b = \frac{ \hat{\mu}_- -
\hat{\mu}_0}{\hat{\sigma}_-}, c = \frac{\hat{\sigma}_0}{\hat{\sigma}_+}, d =
\frac{ \hat{\mu}_+ - \hat{\mu}_0}{\hat{\sigma}_+}
. It is a surface in the
unit cube that plots the probability of a measurement to get assigned to the
intermediate class as the two thresholds c_-,c_+
are varying.
Based on the reference standard, the trinormal based ROC test can be used
to assess the discriminatory power of such classifiers. It distinguishes
between single classifier assessment, where a classifier is compared to some
hypothetical distributions in the classes, and comparison between two
classifiers. The latter case tests for equality between the parameters a, b,
c and d of the ROC curves. The data can arise in a unpaired or paired
setting. If paired
is TRUE
, a correlation is introduced which
has to be taken into account. Therefore the sets of the two classifiers have
to have classwise equal size. The data can be input as the data frame
dat
or as single vectors x1, y1, z1, ...
.
As the Chi-squared test is by definition a one-sided test, the variable
alternative
cannot be specified in this test. For this 'goodness of
fit' test, we assume the parameters a_1, \dots , d_1
and a_2, \dots , d_2
to have a
pairwise equivalent normal distribution (in large sample sets).
Value
A list of class "htest"
containing the following components:
statistic |
the value of the chi-squared statistic. |
parameter |
the degrees of freedom for the chi-squared statistic. |
p.value |
the p-value for the test. |
conf.int |
a confidence interval for the test. |
estimate |
a data frame containing the estimated VUS and parameters a, b, c and d from Classifier 1 and Classifier 2 (if specified). |
null.value |
a character expressing the null hypothesis. |
alternative |
a character string describing the alternative hypothesis. |
method |
a character string indicating what type of trinormal based ROC test was performed. |
data.name |
a character string giving the names of the data. |
CovMat |
the covariance matrix of the chi-squared statistic. |
Summary |
a data frame representing the number of NA's as well as the means and the standard deviations per class. |
References
Noll, S., Furrer, R., Reiser, B. and Nakas, C. T. (2019). Inference in ROC surface analysis via a trinormal model-based testing approach. Stat, 8(1), e249.
See Also
Examples
data(cancer)
data(krebs)
# investigate a single marker:
trinROC.test(dat = cancer[,c(1,3)])
trinROC.test(dat = krebs[,c(1,5)])
# result is equal to:
x1 <- with(cancer, cancer[trueClass=="healthy", 3])
y1 <- with(cancer, cancer[trueClass=="intermediate", 3])
z1 <- with(cancer, cancer[trueClass=="diseased", 3])
trinROC.test(x1, y1, z1)
# comparison of marker 2 and 6:
trinROC.test(dat = cancer[,c(1,3,5)], paired = TRUE)
trinROC.test(dat = cancer[,c(1,3,5)], paired = FALSE)
# result is equal to:
x2 <- with(cancer, cancer[trueClass=="healthy", 5])
y2 <- with(cancer, cancer[trueClass=="intermediate", 5])
z2 <- with(cancer, cancer[trueClass=="diseased", 5])
trinROC.test(x1, y1, z1, x2, y2, z2, paired = TRUE)