View source: R/eig_functions.R
| compute_eig | R Documentation |
Computes Expected Information Gain for lineup identification procedures following Starns et al. (2023). EIG quantifies the evidentiary value of witness responses using information theory.
compute_eig(
eig_data,
prior_guilt = 0.5,
confidence_bins = NULL,
lineup_size = 6,
innocent_suspect = "auto"
)
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. |
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).
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
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.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.