compute_eig: Compute Expected Information Gain (EIG)

View source: R/eig_functions.R

compute_eigR Documentation

Compute Expected Information Gain (EIG)

Description

Computes Expected Information Gain for lineup identification procedures following Starns et al. (2023). EIG quantifies the evidentiary value of witness responses using information theory.

Usage

compute_eig(
  eig_data,
  prior_guilt = 0.5,
  confidence_bins = NULL,
  lineup_size = 6,
  innocent_suspect = "auto"
)

Arguments

eig_data

List output from make_eig_data(), or a dataframe with columns: target_present, identification, confidence

prior_guilt

Numeric. Prior probability that suspect is guilty (default = 0.5)

confidence_bins

Numeric vector of bin edges (only used if eig_data is a dataframe)

lineup_size

Nominal lineup size used when raw target-absent data have no designated innocent suspect.

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

EIG measures how much information (in bits) a witness response provides about guilt vs. innocence. It is computed as:

EIG = \sum_x p(x) \times [H(prior) - H(p(guilty|x))]

where:

  • x = response category (e.g., "suspect_high_confidence")

  • p(x) = probability of that response

  • H() = Shannon entropy

  • p(guilty|x) = posterior probability of guilt given response x

Higher EIG values indicate more diagnostic procedures. EIG = 0 means no information gain (responses don't distinguish guilty from innocent). The maximum EIG is the prior entropy; it is 1 bit only at prior guilt 0.5. Without a designated innocent suspect, EIG assumes a fair lineup (1 / lineup_size of target-absent filler choices are treated as innocent-suspect identifications; see make_eig_data).

Value

A list of class "lineup_eig" containing:

  • eig: Expected Information Gain in bits

  • response_data: Dataframe with information gain for each response category

  • prior_guilt: Prior probability used

  • prior_entropy: Entropy of prior (baseline uncertainty)

  • n_guilty: Number of target-present lineups

  • n_innocent: Number of target-absent lineups

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

# Compute EIG with binned confidence
data(lineup_example)
eig_result <- compute_eig(lineup_example,
                          prior_guilt = 0.5,
                          confidence_bins = c(0, 60, 80, 100))
print(eig_result)


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