---
title: "Multi-d': Lee and Penrod's Signal Detection Framework for Lineups"
author:
- "Colin G. Tredoux"
- "Tamsyn M. Naylor"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteEncoding{UTF-8}
  %\VignetteIndexEntry{Multi-d': Lee and Penrod's Signal Detection Framework for Lineups}
  %\VignetteEngine{knitr::rmarkdown}
editor_options:
  markdown:
    wrap: 72
---

> **Acknowledgement.** Large language models supplied by Anthropic and
> OpenAI were used in preparing this vignette, to assist with checking
> code, testing the veracity of the approaches described, and on occasion
> editing the text. Responsibility for the content rests with the authors.

```{r setup, include=FALSE}
knitr::opts_chunk$set(collapse = TRUE, comment = "#>",
                      warning = FALSE, message = FALSE,
                      fig.width = 7, fig.height = 5)
```

# Overview

Signal detection analyses of eyewitness identification usually reduce a
lineup to a 2 x 2 table. Guilty-suspect identifications are hits,
innocent-suspect identifications are false alarms, and filler
identifications are pooled with rejections as "negative" responses. Lee
and Penrod (2019) argue that this discards the information carried by
filler choices. Their **Multi-d' model** keeps the full 2 x 3 table
(suspect ID, filler ID, rejection) for target-present (TP) and
target-absent (TA) lineups, and computes several empirical d' values from
it.

```{r libraries}
library(r4lineups)
```

# The indices

Write G, Fp and Rp for the guilty-suspect, filler and rejection rates in
TP lineups, and I, Fa and Ra for the innocent-suspect, filler and
rejection rates in TA lineups. Each index is a difference between two
z-transformed rates.

| Index | Formula | Interpretation |
|----|----|----|
| d'(GI) | z(G) − z(I) | Guilty versus innocent suspect (the usual empirical d') |
| d'(GFp) | z(G) − z(Fp) | Guilty suspect versus TP fillers |
| d'(IFa) | z(I) − z(Fa) | Innocent suspect versus TA fillers: TA lineup bias |
| d'(FaFp) | z(Fa) − z(Fp) | Difference in filler-choice rate between TA and TP lineups |
| d'(RaRp) | z(Ra) − z(Rp) | Detection of culprit presence versus absence |
| d'(GFp) − d'(RaRp) | | TP lineup bias, net of memory strength |

The TP–TA filler difference d'(FaFp) is expected to be positive partly
because the culprit draws choices in TP lineups, and the index assumes that
one filler rate is shared by all fillers; it is not a property of the fillers
alone.

The three filler indices combine to give d'(GI):

$$d'(GI) = d'(GFp) - d'(IFa) - d'(FaFp).$$

The filler terms cancel, so this holds for any data set. It is an
accounting identity, not an empirical finding, and its value lies in
showing *where* a given d'(GI) comes from. A lineup procedure can reach
the same d'(GI) because witnesses separate the culprit well from the
fillers, or because they rarely single out an innocent suspect.

# A published example

Lee and Penrod's Table 4 applies the model to the lineup data in
Steblay et al.'s (2003) meta-analysis. The rates can be entered as
counts per 100 lineups, and `correction = "none"` reproduces the
published values.

```{r table4}
md <- make_multid(counts = c(G = 45, Fp = 24, Rp = 31, I = 17, Fa = 26, Ra = 57),
                  correction = "none")
md
```

The published values are d'(GI) = 0.83, d'(GFp) = 0.58, d'(IFa) = −0.31,
d'(FaFp) = 0.06 and d'(RaRp) = 0.67. The decomposition plot shows how the
components add up to d'(GI).

```{r decomposition-plot}
plot(md)
```

# Interpreting d'(IFa) as lineup bias

Lee and Penrod use the **total** filler identification rate, so d'(IFa)
compares the innocent suspect with all the fillers taken together.
Consequently, a perfectly fair lineup does not give d'(IFa) = 0. If
witnesses who choose spread their choices evenly over six members, the
innocent suspect receives one sixth of the choices and the fillers five
sixths, and d'(IFa) is z(1/6) − z(5/6) ≈ −1.93 when nobody rejects. The
value also changes with the rejection rate. `make_multid()` therefore
reports `fair_reference`, the d'(IFa) a perfectly fair lineup would give
at the observed TA rejection rate, together with `ifa_vs_fair`, the
observed d'(IFa) minus that reference. Positive values of `ifa_vs_fair`
mean that the innocent suspect draws more than a fair share of choices.
These two quantities are not part of Lee and Penrod's model; we provide
them as an aid to interpretation.

The alternative, `filler_rate = "per_filler"`, divides each filler rate
by the number of fillers, so that the filler indices refer to an average
single filler and a fair lineup gives d'(IFa) close to 0.

```{r fair-reference}
md$indices[md$indices$index %in% c("IFa", "fair_reference", "ifa_vs_fair"),
           c("index", "estimate")]
make_multid(counts = c(G = 45, Fp = 24, Rp = 31, I = 17, Fa = 26, Ra = 57),
            filler_rate = "per_filler", correction = "none")$indices[3, ]
```

When the TA lineups have no designated innocent suspect, the
innocent-suspect rate is estimated as the TA filler rate divided by the
nominal lineup size, as in `make_fullroc()`. Lee and Penrod call this the
"average-filler" practice. It assumes the TA lineup to be fair, so in
that case d'(IFa) carries no information about bias and moves only with
the rejection rate.

# Trial-level data, bootstrap intervals and confidence

With trial-level data, `make_multid()` takes the same `target_present`
and `identification` columns as the other confidence-based functions in
the package. Bootstrap percentile intervals are obtained by resampling
within the TP and TA arms. With `by_confidence = TRUE`, the indices are
also computed cumulatively: at each threshold, only responses made with
at least that confidence are counted, over the full number of lineups in
each arm, as in Lee and Penrod's Table 9.

```{r trial-level}
data(lineup_example)
md2 <- make_multid(lineup_example, by_confidence = TRUE,
                   n_bootstrap = 500, seed = 2026)
summary(md2)
```

```{r indices-plot}
plot(md2, type = "indices")
```

Lee and Penrod report that d'(GI) is fairly stable across confidence
thresholds while its components change. High-confidence witnesses earn
their d'(GI) mainly by distinguishing the culprit from the fillers;
low-confidence witnesses earn much of theirs because their choices spread
over the fillers and so seldom land on the innocent suspect.

```{r confidence-plot}
plot(md2, type = "confidence")
```

In `lineup_example`, rejections were recorded only at the lowest
confidence level, so d'(RaRp) is uninformative above that threshold.

# Comparing two conditions

`compare_multid()` gives the difference between two conditions on each
index, with bootstrap standard errors, intervals and p-values when both
analyses were bootstrapped. Lee and Penrod's Table 3 reports
simultaneous and sequential lineups from Steblay, Dysart and Wells
(2011); here the rates are entered as counts per 100 lineups.

```{r compare}
sim <- make_multid(counts = c(G = 52, Fp = 25, Rp = 24, I = 28, Fa = 26, Ra = 46),
                   n_bootstrap = 500, seed = 1)
sqn <- make_multid(counts = c(G = 44, Fp = 19, Rp = 39, I = 15, Fa = 17, Ra = 68),
                   n_bootstrap = 500, seed = 2)
compare_multid(sim, sqn, labels = c("simultaneous", "sequential"))
```

Because these are rates per 100, the intervals reflect samples of 100
lineups per arm, not the much larger samples of the meta-analysis. With
real data, the counts should be the observed frequencies.

# Cautions

The Multi-d' indices are *resultant* measures: they require the responses
of real witnesses to TP and TA lineups. They can describe or compare
lineups after an experiment, but, unlike mock-witness measures such as
`esize_T()` or `func_size()`, they cannot be used to vet a lineup before
it is shown to a witness. Lee, Mansour and Penrod (2024) found that resultant
measures, including d'(IFa), predicted eyewitness performance best, which they
note is expected because those measures are computed from the same witnesses'
responses; among mock-witness measures, the lineup-bias indices predicted
suspect identification rates but the lineup-size indices did not.

Each index is an equal-variance d' computed from a single pair of rates.
Lee and Penrod present the model as a descriptive framework, a "series of
thought experiments", and do not claim that the indices estimate
underlying memory parameters. Models fitted to the full response
distribution, such as `fit_max_sdt()` or `fit_winter_2ht()`, serve that
purpose. Finally, the indices are sensitive to how extreme rates are
handled. The default log-linear correction keeps them finite when a cell
is empty, but it moves them slightly away from values computed from raw
proportions.

# References

::: {.hanging-indent}

Lee, J., Mansour, J. K., & Penrod, S. D. (2022). Validity of mock-witness measures for assessing lineup fairness. *Psychology, Crime & Law*. https://doi.org/10.1080/1068316X.2021.1905811

Lee, J., Mansour, J. K., & Penrod, S. D. (2024). How to measure lineup fairness: Concurrent and predictive validity of lineup-fairness measures. *Psychology, Crime & Law*. https://doi.org/10.1080/1068316X.2024.2307358

Lee, J., & Penrod, S. D. (2019). New signal detection theory-based framework for eyewitness performance in lineups. *Law and Human Behavior*. https://doi.org/10.1037/lhb0000343

Steblay, N., Dysart, J., Fulero, S., & Lindsay, R. C. L. (2003). Eyewitness accuracy rates in police showup and lineup presentations: A meta-analytic comparison. *Law and Human Behavior, 27*, 523-540.

Steblay, N. K., Dysart, J. E., & Wells, G. L. (2011). Seventy-two tests of the sequential lineup superiority effect: A meta-analysis and policy discussion. *Psychology, Public Policy, and Law, 17*, 99-139.

:::

# Further Reading

- `?make_multid`, `?compare_multid`, `?plot.multid`
- `vignette("sdt_summary_comparisons")` for d' and criterion from 2 x 2
  counts
- `vignette("msdt_model")` and `vignette("lineup_memory_models")` for
  process models of the full response breakdown
