specificity {NetFACS} | R Documentation |
Specificity
Description
Calculate specificity of element combinations to a given condition
Usage
specificity(
x,
condition,
test.condition = NULL,
null.condition = NULL,
combination.size = NULL,
upsample = TRUE
)
Arguments
x |
A binary matrix, with AUs as |
condition |
A character condition vector |
test.condition |
A string, denoting the test condition. If |
null.condition |
A string, denoting the null condition. If |
combination.size |
A positive integer, indicating the maximum
combination size of element combinations. If |
upsample |
Logical. Should minority condition(s) be
|
Details
Specificity values are biased when the number of observations per
condition is highly imbalanced. When upsample
= TRUE
(recommended), the condition(s) with fewer observations are randomly
upsample
d to match the number of observations in the most
common condition prior to the specificity calculation. This procedure
minimizes the bias in the specificity results.
Value
A data frame
Examples
specificity(
x = emotions_set[[1]],
condition = emotions_set[[2]]$emotion,
test.condition = "anger"
)