roc.eda {trinROC} | R Documentation |
Exploratory data analysis for a three-class ROC marker
Description
A function that investigates data that arose from a single marker and containes the reference standard of the three classes "healthy", "intermediate" and "diseased".
Usage
roc.eda(
x,
y,
z,
dat = NULL,
type = c("empirical", "trinormal"),
plotVUS = FALSE,
saveVUS = FALSE,
sep.dens = FALSE,
scatter = FALSE,
conf.level = 0.95,
n.boot = 1000,
verbose = TRUE,
alternative = c("two.sided", "less", "greater")
)
Arguments
x , y , z |
numeric vectors contaning the measurements from the healthy, intermediate and diseased class. |
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. |
type |
a character, specifying if the |
plotVUS |
a logical whether to evaluate and plot the VUS (default is
|
saveVUS |
a logical whether to save a PNG of the VUS in your current
working directory (default is |
sep.dens |
a logical indicating if the densitie plots should be plotted
on separate x-axes ( |
scatter |
a logical indicating if the measurements per class plot should
be plotted as a boxplot (default) or as a scatterplot ( |
conf.level |
A numeric value between 0 and 1 yielding the significance
level |
n.boot |
an integer incicating the number of bootstrap replicates sampled to obtain the variance of the VUS. Default is 1000. |
verbose |
a logical, indicating whether output should be displayed or
not. Default is |
alternative |
a character string specifying the alternative hypothesis,
must be one of |
Details
For the preliminary assessment of a classifier, exporatory data analysis (EDA) on the markers is necessary. This function assesses measurements from a single marker and computes the VUS, statistical tests and returns a summary table as well as some plots of the data.
Value
A list with class "htest" containing the following components:
statistic |
The value of the test(s). |
p.value |
The p-value for the test(s). |
VUS |
the VUS computed with the specific method defined in
|
dat.summary |
A data frame displaying size, mean and standard deviation of the three classes. |
alternative |
The alternative hypothesis. |
type |
a character containing the the method used for the exploratory data analysis. |
data.name |
a character containing the name of the data. |
xVUS , yVUS , zVUS |
(if |
histROC |
a |
meas.overview |
A ggplot2 object, displaying the boxplots (if
|
Warning
If type = "empirical"
, computation may take a while, as roc.eda
calls
the function boot.test()
.
See Also
trinROC.test
, trinVUS.test
for trinormal
data investigation, boot.test
for empirical data analysis.
rocsurf.emp
, rocsurf.trin
for the surface plot.
Examples
data(krebs)
# empirical EDA:
roc.eda(dat = krebs[,c(1,5)], type = "e", plotVUS = FALSE)
# equal data input via:
x <- with(krebs, krebs[trueClass=="healthy", 5])
y <- with(krebs, krebs[trueClass=="intermediate", 5])
z <- with(krebs, krebs[trueClass=="diseased", 5])
roc.eda(x, y, z, type = "e", sep.dens = TRUE)
data(cancer)
# trinormal EDA:
roc.eda(dat = cancer[,c(1,10)], type = "trin", plotVUS = FALSE)
# trinormal EDA with different plots:
roc.eda(dat = cancer[,c(1,5)], type = "t", sep.dens = TRUE, scatter = TRUE)