View source: R/utility_functions.R
| compare_utility | R Documentation |
Main wrapper function to compute and plot utility comparison between two lineup procedures.
compare_utility(
data_proc_a,
data_proc_b,
base_rate_grid = seq(0.01, 0.99, 0.01),
utility_matrix = c(tp = 1, fn = -0.5, fp = -2, tn = 0.5),
utility_type = c("max", "avg", "all"),
show_plot = TRUE,
innocent_suspect = "auto",
...
)
data_proc_a |
Dataframe for procedure A |
data_proc_b |
Dataframe for procedure B |
base_rate_grid |
Numeric vector of base rates (default: seq(0.01, 0.99, 0.01)) |
utility_matrix |
Named vector of utilities (default: c(tp=1, fn=-0.5, fp=-2, tn=0.5)) |
utility_type |
Character. "max", "avg", or "all" (default = "max") |
show_plot |
Logical. Whether to display plot (default = TRUE) |
innocent_suspect |
How innocent-suspect identifications in
target-absent lineups are obtained. |
... |
Additional arguments passed to plot_utility_difference() |
A list containing difference curve data and plot
data(lineup_example)
odd <- seq(1, nrow(lineup_example), by = 2)
comparison <- compare_utility(lineup_example[odd, ],
lineup_example[-odd, ],
base_rate_grid = seq(0.1, 0.9, 0.1),
utility_type = "max")
print(comparison)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.