| areaCAT {benchdamic} | R Documentation |
Compute the area between the bisector and the concordance curve.
areaCAT(concordance, plotIt = FALSE)
concordance |
A long format |
plotIt |
Plot the concordance (default |
A long format data.frame object with several columns:
comparison which indicates the comparison number;
n_features which indicates the total number of taxa in
the comparison dataset;
method1 which contains the first method name;
method2 which contains the first method name;
rank;
concordance which is defined as the cardinality of the
intersection of the top rank elements of each list, divided by rank, i.e.
, (L_{1:rank} \bigcap M_{1:rank})/(rank), where L and M represent
the lists of the extracted statistics of method1 and method2
respectively;
heightOver which is the distance between the bisector and
the concordance value;
areaOver which is the cumulative sum of the
heightOver value.
createConcordance and plotConcordance
data(ps_plaque_16S)
# Balanced design for independent samples
my_splits <- createSplits(
object = ps_plaque_16S, varName =
"HMP_BODY_SUBSITE", balanced = TRUE, N = 10 # N = 100 suggested
)
# Initialize some limma based methods
my_limma <- set_limma(design = ~ HMP_BODY_SUBSITE, coef = 2,
norm = c("TMM", "CSSmedian"))
# Set the normalization methods according to the DA methods
my_norm <- setNormalizations(fun = c("norm_edgeR", "norm_CSS"),
method = c("TMM", "median"))
# Run methods on split datasets
results <- runSplits(split_list = my_splits, method_list = my_limma,
normalization_list = my_norm, object = ps_plaque_16S)
# Concordance for p-values
concordance_pvalues <- createConcordance(
object = results, slot = "pValMat", colName = "rawP", type = "pvalue"
)
# Add area over the concordance curve
concordance_area <- areaCAT(concordance = concordance_pvalues)