make_eig_data: Prepare EIG Data from Lineup Identification

View source: R/eig_functions.R

make_eig_dataR Documentation

Prepare EIG Data from Lineup Identification

Description

Prepares response category data for Expected Information Gain (EIG) analysis following Starns et al. (2023). Creates response categories from identification decisions and confidence levels.

Usage

make_eig_data(
  data,
  confidence_bins = NULL,
  lineup_size = 6,
  innocent_suspect = "auto"
)

Arguments

data

A dataframe with the following columns:

  • target_present: Logical. TRUE if guilty suspect in lineup

  • identification: Character. "suspect", "filler", or "reject"

  • confidence: Numeric. Confidence rating

confidence_bins

Numeric vector of bin edges for grouping confidence (e.g., c(0, 60, 80, 100) creates bins 0-60, 61-80, 81-100). If NULL, uses individual confidence levels.

lineup_size

Nominal lineup size. Used to split target-absent filler identifications when no designated innocent suspect is present.

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.

Details

Response categories are defined as combinations of identification decision (suspect/filler/reject) and confidence level or bin. This function counts the frequency of each response category separately for target-present (guilty) and target-absent (innocent) lineups.

When no innocent suspect is designated (innocent_suspect = "estimated", or "auto" on such data), 1 / lineup_size of each target-absent filler count is moved into the matching suspect category, so the result assumes a fair lineup of lineup_size members.

Value

A list containing:

  • response_data: Dataframe with response categories and frequencies

  • n_guilty: Total number of target-present lineups

  • n_innocent: Total number of target-absent lineups

  • confidence_bins: The binning specification used (if any)

References

Starns, J. J., Cohen, A. L., & Rotello, C. M. (2023). A complete method for assessing the effectiveness of eyewitness identification procedures: Expected information gain. Psychological Review, 130(3), 677–719.

Examples

data(lineup_example)
eig_data <- make_eig_data(lineup_example, confidence_bins = c(0, 60, 80, 100))
eig_data$response_data


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