add_stats {FFTrees} | R Documentation |
Add decision statistics to data (based on frequency counts of a 2x2 classification outcomes)
Description
add_stats
assumes the input of the 4 essential classification outcomes
(as frequency counts in a data frame "data"
with variable names "hi"
, "fa"
, "mi"
, and "cr"
)
and uses them to compute various decision accuracy measures.
Usage
add_stats(
data,
correction = 0.25,
sens.w = NULL,
my.goal = NULL,
my.goal.fun = NULL,
cost.outcomes = NULL,
cost.each = NULL
)
Arguments
data |
A data frame with 4 frequency counts (as integer values, named |
correction |
numeric. Correction added to all counts for calculating |
sens.w |
numeric. Sensitivity weight (for computing weighted accuracy, |
my.goal |
Name of an optional, user-defined goal (as character string).
Default: |
my.goal.fun |
User-defined goal function (with 4 arguments |
cost.outcomes |
list. A list of length 4 named |
cost.each |
numeric. An optional fixed cost added to all outputs (e.g., the cost of using the cue).
Default: |
Details
Providing numeric values for cost.each
(as a vector) and cost.outcomes
(as a named list)
allows computing cost information for the counts of corresponding classification decisions.
Value
A data frame with variables of computed accuracy and cost measures (but dropping inputs).