make_cac: Compute and Plot CAC for Lineup Identification

View source: R/cac_functions.R

make_cacR Documentation

Compute and Plot CAC for Lineup Identification

Description

Main function to compute and plot CAC (Confidence-Accuracy Characteristic) for eyewitness lineup data.

Usage

make_cac(
  data,
  lineup_size = 6,
  confidence_bins = NULL,
  show_plot = TRUE,
  innocent_suspect = "auto",
  base_rate = NULL,
  ...
)

Arguments

data

A dataframe with columns: target_present, identification, confidence

lineup_size

Integer. Number of people in lineup (default = 6)

confidence_bins

Numeric vector of bin edges (optional)

show_plot

Logical. Whether to display the plot (default = TRUE)

innocent_suspect

How innocent-suspect identifications in target-absent lineups are obtained. "designated": the lineups had a designated innocent suspect, so target-absent "suspect" rows are counted directly, and zero such rows means a false-ID rate of zero. "estimated": there was no designated innocent suspect, so the innocent-suspect count is estimated as filler IDs divided by lineup_size. "auto" (the default) chooses "designated" when any target-absent row is a suspect ID or the data have a non-missing suspect_pos column, and "estimated" otherwise, with a message.

base_rate

See make_cacdata.

...

Additional arguments passed to make_cac_gg()

Value

A list containing CAC data and plot

Examples

data(lineup_example)
cac_result <- make_cac(lineup_example, confidence_bins = c(0, 60, 80, 100))
print(cac_result)


r4lineups documentation built on Nov. 10, 2026, 1:08 a.m.