View source: R/dpp_functions.R
| compare_dpp | R Documentation |
Computes average DPP for two lineup procedures and tests their difference with a nonparametric bootstrap, as Smith et al. (2019) did.
compare_dpp(
data_proc_a,
data_proc_b,
lineup_size = 6,
alpha = NULL,
beta = NULL,
n_bootstrap = 1000,
conf_level = 0.95,
seed = NULL,
innocent_suspect = "auto"
)
data_proc_a |
Dataframe for procedure A (standard lineup format) |
data_proc_b |
Dataframe for procedure B (standard lineup format) |
lineup_size |
Integer. Lineup size (default = 6) |
alpha, beta |
Optional Equation 3 weights; see |
n_bootstrap |
Integer. Number of bootstrap samples (default = 1000). Use 0 to skip the bootstrap. |
conf_level |
Numeric. Confidence level for the interval (default = 0.95) |
seed |
Integer. Random seed for reproducibility (default = NULL) |
innocent_suspect |
How innocent-suspect identifications in
target-absent lineups are obtained. |
Lower DPP indicates better performance, so a negative difference means procedure A is better. Each bootstrap replicate resamples target-present and target-absent trials separately within each procedure, so every replicate keeps the original design, and the two procedures are treated as independent samples. The innocent-suspect design and the confidence criteria are determined once on each full dataset and reused in every replicate, so every replicate averages over the same criteria.
An object of class "lineup_dpp_comparison", a list containing:
dpp_a: Average DPP for procedure A
dpp_b: Average DPP for procedure B
dpp_difference: DPP_A - DPP_B (negative = A is better)
se_difference: Bootstrap standard error of the difference
ci_difference: Percentile bootstrap interval for the difference
boot_differences: Bootstrap distribution of the difference
dpp_obj_a, dpp_obj_b: Full make_dpp() objects
n_bootstrap, conf_level: Settings used
Smith, A. M., Lampinen, J. M., Wells, G. L., Smalarz, L., & Mackovichova, S. (2019). Deviation from perfect performance measures the diagnostic utility of eyewitness lineups but partial area under the ROC curve does not. Journal of Applied Research in Memory and Cognition, 8(1), 50-59. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.jarmac.2018.09.003")}
data(lineup_example)
# Compare two halves of the example data (odd vs even rows)
odd <- seq(1, nrow(lineup_example), by = 2)
# 50 resamples keep the example quick; use 1000 or more in an analysis
cmp <- compare_dpp(lineup_example[odd, ], lineup_example[-odd, ],
n_bootstrap = 50, seed = 1)
cmp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.