Description Usage Arguments Details Value Author(s) Examples
Do the ROC analysis (roc_analysis) for each column of x.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## S3 method for class 'manyroc_result'
print(x, ..., show_all = FALSE, perf_digits = 2, fmt = "%.3g")
roc_manyroc(x, gr = NULL, optimize_by = "bac", ...)
## S3 method for class 'matrix'
roc_manyroc(x, gr = NULL, optimize_by = "bac", ..., gr_sep = " vs. ")
## S3 method for class 'numeric'
roc_manyroc(x, gr = NULL, optimize_by = "bac", ...)
## S3 method for class 'data.frame'
roc_manyroc(x, gr = NULL, optimize_by = "bac", ...)
## S3 method for class 'hyperSpec'
roc_manyroc(x, gr = NULL, optimize_by = "bac", ...)
|
x |
A numeric matrix, a data frame, a |
... |
Arguments passed for further methods. |
show_all |
( |
perf_digits |
( |
fmt |
( |
gr |
Either a string (scalar, |
optimize_by |
(
|
gr_sep |
Group separator used to paste the names of groups. Default is
|
Consider ordering of factor gr levels before the analysis, as the
first level will always be treated as negative and the last as positive.
E.g., if we have factor with 3 levels in this particular order
"A", "B", "C", then "A" will always be negative, "C" always positive and
"B" positive, when compared to "A" and negative, when compared to "C".
The same principle applies if there are more than 3 levels.
This is important determining what specificity and sensitivity, etc., means
in the context of group names: if positive is "A" then sensitivity
will be related to group "A", but if "A" is negative, then specificity
will be related to this group, and sensitivity to the other group.
For spectroscopic data: compare spectra of each pair of indicated groups at each wavelength.
Object of classes manyroc_result and data.frame with
columns:
compared_groups Names of compared groups (separated by
gr_sep with default value " vs. ");
feature names of numeric features used in analysis;
median_neg median value of negatives group;
cutoff for optimal threshold/cut-off values and
corresponding performance measures;
median_pos median value positives group;
TP number of true positives;
FN number of false negatives;
FP number of false positives;
TN number of true negatives;
sens sensitivity (true positive rate, recall);
spec specificity (true negative rate);
PPV positive predictive value (precision);
NPV negative predictive value;
BAC balanced accuracy;
Youden Youden’s J index;
Kappa Cohen's kappa;
AUC area under the ROC curve;
Vilmantas Gegzna
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | library(manyROC)
# --- For numeric vectors objects ---
data(PlantGrowth)
roc_manyroc(x = PlantGrowth$weight, gr = PlantGrowth$group)
# --- For dataframes objects ---
data(CO2)
roc_manyroc(CO2[, c("conc", "uptake")], CO2$Type)
data(OrchardSprays)
roc_manyroc(OrchardSprays$decrease, OrchardSprays$treatment)
# --- For hyperSpec objects ---
library(hyperSpec)
fluorescence
roc_manyroc(fluorescence[, , 500 ~ 502], fluorescence$gr)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.