View source: R/calibration_functions.R
| make_calibration | R Documentation |
Main function to compute and plot calibration analysis for eyewitness lineup data.
make_calibration(
data,
confidence_bins = NULL,
choosers_only = TRUE,
lineup_size = 6,
show_plot = TRUE,
confidence_scale = c("auto", "0-1", "0-100"),
innocent_suspect = "auto",
population = NULL,
tp_fillers = c("exclude", "error"),
...
)
data |
A dataframe with columns: target_present, identification, confidence |
confidence_bins |
Numeric vector of bin edges (optional) |
choosers_only |
Logical. If |
lineup_size |
Integer. Number of people in lineup (default = 6) |
show_plot |
Logical. Whether to display the plot (default = TRUE) |
confidence_scale |
How the confidence scale is interpreted: "auto" (default),
"0-1", or "0-100". See |
innocent_suspect |
How innocent-suspect identifications in
target-absent lineups are obtained. |
population |
Which responses are calibrated: |
tp_fillers |
For |
... |
Additional arguments passed to make_calibration_gg() |
A list containing calibration data, statistics, and plot
set.seed(123)
n <- 200
lineup_data <- data.frame(
target_present = rep(c(TRUE, FALSE), each = n / 2),
identification = sample(c("suspect", "filler", "reject"), n,
replace = TRUE, prob = c(0.5, 0.25, 0.25)),
confidence = round(runif(n, 0, 100))
)
cal_result <- make_calibration(lineup_data,
confidence_bins = c(0, 60, 80, 100))
print(cal_result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.