Title: | Statistical Inference on Lineup Fairness |
---|---|
Description: | Since the early 1970s eyewitness testimony researchers have recognised the importance of estimating properties such as lineup bias (is the lineup biased against the suspect, leading to a rate of choosing higher than one would expect by chance?), and lineup size (how many reasonable choices are in fact available to the witness? A lineup is supposed to consist of a suspect and a number of additional members, or foils, whom a poor-quality witness might mistake for the perpetrator). Lineup measures are descriptive, in the first instance, but since the earliest articles in the literature researchers have recognised the importance of reasoning inferentially about them. This package contains functions to compute various properties of laboratory or police lineups, and is intended for use by researchers in forensic psychology and/or eyewitness testimony research. Among others, the r4lineups package includes functions for calculating lineup proportion, functional size, various estimates of effective size, diagnosticity ratio, homogeneity of the diagnosticity ratio, ROC curves for confidence x accuracy data and the degree of similarity of faces in a lineup. |
Authors: | Colin Tredoux [aut, cre], Tamsyn Naylor [aut] |
Maintainer: | Colin Tredoux <[email protected]> |
License: | CC0 |
Version: | 0.1.1 |
Built: | 2025-03-13 03:46:52 UTC |
Source: | https://github.com/cran/r4lineups |
Function to compute ci high for each foil in a lineup
allfoil_cihigh(linetabprops, sumlineup)
allfoil_cihigh(linetabprops, sumlineup)
linetabprops |
A dataframe of bootstrapped lineup proportions |
sumlineup |
Number of members in a lineup |
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Function to compute bias for each lineup member (assuming foil is suspect, from Malpass, 1981)
allfoilbias(lineup_table, target_pos, k)
allfoilbias(lineup_table, target_pos, k)
lineup_table |
A table of lineup choices |
target_pos |
A scalar, representing target position in lineup. Must be declared by user |
k |
Nominal size (i.e., total number of members in lineup). Must be specified by user (scalar). |
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
lineup_vec <- round(runif(100, 1, 6)) lineup_table <- table(lineup_vec) x <- allfoilbias(lineup_table, 5, 6)
lineup_vec <- round(runif(100, 1, 6)) lineup_table <- table(lineup_vec) x <- allfoilbias(lineup_table, 5, 6)
Computes lineup proportion for each member in a lineup
allprop(lineup_vec, k)
allprop(lineup_vec, k)
lineup_vec |
A numeric vector of lineup choices |
k |
Number of members in lineup. Must be specified by user (scalar). |
Returns a vector containing lineup proportion for each lineup member
Wells, G. L., Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
#Data: lineup_vec <- round(runif(100, 1, 6)) #Call: x <- allprop(lineup_vec, k = 6)
#Data: lineup_vec <- round(runif(100, 1, 6)) #Call: x <- allprop(lineup_vec, k = 6)
Function for getting chi-squared value for homogeneity of diagnosticity ratios
chi_diag(df)
chi_diag(df)
df |
A dataframe containing: ln(d), variance of ln(d), d weights |
To compute linedf, use the diag_param helper function.
To compute df, apply ln_diag_ratio, var_lnd & d_weights functions to linedf, then bind results into one dataframe (see Examples)
The order in which the estimates are bound together (i.e., their position in the dataframe) is important, and should always be as follows: row 1: var, row 2: lnd, row 3: wi.
Chi squared estimate of homogeneity of diagnosticity ratios for k independent lineups
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Malpass, R. S., Tredoux, C., & McQuiston-Surrett, D. (2007). Lineup construction and lineup fairness. In R. Lindsay, D. F. Ross, J. D. Read, & M. P. Toglia (Eds.), Handbook of Eyewitness Psychology, Vol. 2: Memory for people (pp. 155-178). Mahwah, NJ: Lawrence Erlbaum Associates.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L., Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
#Target present data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_pres_list <- list(A, B, C) rm(A, B, C) #Target absent data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_abs_list <- list(A, B, C) rm(A, B, C) #Pos list lineup1_pos <- c(1, 2, 3, 4, 5, 6) lineup2_pos <- c(1, 2, 3, 4, 5) lineup3_pos <- c(1, 2, 3, 4) pos_list <- list(lineup1_pos, lineup2_pos, lineup3_pos) rm(lineup1_pos, lineup2_pos, lineup3_pos) #Nominal size: k <- c(6, 5, 4) #Use diag param helper function to get data (n11, n21, n12, n22): linedf <- diag_param(lineup_pres_list, lineup_abs_list, pos_list, k) #Get ln(d), variance of ln(d) & d weights: ratio <- ln_diag_ratio(linedf) var <- var_lnd(linedf) wi <- d_weights(linedf) #Bind estimates into one df of 3 rows & x observations #(see Details above) df <- t(cbind(ratio, var, wi)) #Call: chi_diag(df)
#Target present data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_pres_list <- list(A, B, C) rm(A, B, C) #Target absent data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_abs_list <- list(A, B, C) rm(A, B, C) #Pos list lineup1_pos <- c(1, 2, 3, 4, 5, 6) lineup2_pos <- c(1, 2, 3, 4, 5) lineup3_pos <- c(1, 2, 3, 4) pos_list <- list(lineup1_pos, lineup2_pos, lineup3_pos) rm(lineup1_pos, lineup2_pos, lineup3_pos) #Nominal size: k <- c(6, 5, 4) #Use diag param helper function to get data (n11, n21, n12, n22): linedf <- diag_param(lineup_pres_list, lineup_abs_list, pos_list, k) #Get ln(d), variance of ln(d) & d weights: ratio <- ln_diag_ratio(linedf) var <- var_lnd(linedf) wi <- d_weights(linedf) #Bind estimates into one df of 3 rows & x observations #(see Details above) df <- t(cbind(ratio, var, wi)) #Call: chi_diag(df)
A base function for bootstrapping a dataframe of choices for 2 independent lineups
compare_eff_sizes.boot(linedf, d)
compare_eff_sizes.boot(linedf, d)
linedf |
A dataframe of lineup data. Must consist of 2 columns, each containing data for 2 independent lineups |
d |
Indices for bootstrap sample. Argument used by boot function to select samples for bootstrapping |
The approach here is to compute the effective size of each lineup separately, and to take the difference between them. This is then bootstrapped, and if the bootstrap does not contain 0, we conclude the effective size estimates are different at p = alpha
Davison, A.C. & Hinkley, D.V. (1997). Bootstrap methods and their application. Cambridge University Press.
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Malpass, R. S., Tredoux, C., & McQuiston-Surrett, D. (2007). Lineup construction and lineup fairness. In R. Lindsay, D. F. Ross, J. D. Read, & M. P. Toglia (Eds.), Handbook of Eyewitness Psychology, Vol. 2: Memory for people (pp. 155-178). Mahwah, NJ: Lawrence Erlbaum Associates.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
Function for computing pooled estimator from a set of k diagnosticity ratios
d_bar(df)
d_bar(df)
df |
A dataframe containing rows: ln(d), variance of ln(d), d weights |
. The order in which the estimates are bound together (i.e., their position in the dataframe) is important, and should always be as follows:
row 1: var
row 2: lnd
row 3: wi
Mean diagnosticity ratio for k independent lineups
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Malpass, R. S., Tredoux, C., & McQuiston-Surrett, D. (2007). Lineup construction and lineup fairness. In R. Lindsay, D. F. Ross, J. D. Read, & M. P. Toglia (Eds.), Handbook of Eyewitness Psychology, Vol. 2: Memory for people (pp. 155-178). Mahwah, NJ: Lawrence Erlbaum Associates.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
#Target present data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_pres_list <- list(A, B, C) rm(A, B, C) #Target absent data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_abs_list <- list(A, B, C) rm(A, B, C) #Pos list lineup1_pos <- c(1, 2, 3, 4, 5, 6) lineup2_pos <- c(1, 2, 3, 4, 5) lineup3_pos <- c(1, 2, 3, 4) pos_list <- list(lineup1_pos, lineup2_pos, lineup3_pos) rm(lineup1_pos, lineup2_pos, lineup3_pos) #Nominal size: k <- c(6, 5, 4) #Use diag param helper function to get data (n11, n21, n12, n22): linedf <- diag_param(lineup_pres_list, lineup_abs_list, pos_list, k) #Compute ln(d): ratio <- ln_diag_ratio(linedf) #Compute variance of ln(d): var <- var_lnd(linedf) #Compute weights for pooled estimator: wi <- d_weights(linedf) #Bind ln(d), variance of ln(d) and weights into one df (of 3 rows & x observations) #(see Details above): df <- t(cbind(ratio, var, wi)) #Call: d_bar(df)
#Target present data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_pres_list <- list(A, B, C) rm(A, B, C) #Target absent data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_abs_list <- list(A, B, C) rm(A, B, C) #Pos list lineup1_pos <- c(1, 2, 3, 4, 5, 6) lineup2_pos <- c(1, 2, 3, 4, 5) lineup3_pos <- c(1, 2, 3, 4) pos_list <- list(lineup1_pos, lineup2_pos, lineup3_pos) rm(lineup1_pos, lineup2_pos, lineup3_pos) #Nominal size: k <- c(6, 5, 4) #Use diag param helper function to get data (n11, n21, n12, n22): linedf <- diag_param(lineup_pres_list, lineup_abs_list, pos_list, k) #Compute ln(d): ratio <- ln_diag_ratio(linedf) #Compute variance of ln(d): var <- var_lnd(linedf) #Compute weights for pooled estimator: wi <- d_weights(linedf) #Bind ln(d), variance of ln(d) and weights into one df (of 3 rows & x observations) #(see Details above): df <- t(cbind(ratio, var, wi)) #Call: d_bar(df)
Function to compute weights of each diagnosticity ratio for k lineup pairs
d_weights(linedf)
d_weights(linedf)
linedf |
A dataframe of parameters for computing diagnosticity ratio |
In order to obtain a pooled estimate of a set of diagnosticity ratios, we use a weight for each ratio that is equal to the inverse of its variance.
To get linedf, use the diag_param helper function
diag_param returns a dataframe containing the following:
n11: Number of mock witnesses who identified the suspect in the target present condition
n21: Number of mock witnesses who did not identify the suspect in the target present condition
n12: Number of mock witnesses who identified the suspect in the target absent condition
n13: Number of mock witnesses who did not identify the suspect in the target absent condition
A dataframe with one column containing weights for each pair of lineups for which diagnosticity ratio is being calculated.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
#Target present data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_pres_list <- list(A, B, C) rm(A, B, C) #Target absent data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_abs_list <- list(A, B, C) rm(A, B, C) #Pos list lineup1_pos <- c(1, 2, 3, 4, 5, 6) lineup2_pos <- c(1, 2, 3, 4, 5) lineup3_pos <- c(1, 2, 3, 4) pos_list <- list(lineup1_pos, lineup2_pos, lineup3_pos) rm(lineup1_pos, lineup2_pos, lineup3_pos) #Nominal size: k <- c(6, 5, 4) #Use diag param helper function to get data (n11, n21, n12, n22): linedf <- diag_param(lineup_pres_list, lineup_abs_list, pos_list, k) #Call: wi <- d_weights(linedf)
#Target present data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_pres_list <- list(A, B, C) rm(A, B, C) #Target absent data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_abs_list <- list(A, B, C) rm(A, B, C) #Pos list lineup1_pos <- c(1, 2, 3, 4, 5, 6) lineup2_pos <- c(1, 2, 3, 4, 5) lineup3_pos <- c(1, 2, 3, 4) pos_list <- list(lineup1_pos, lineup2_pos, lineup3_pos) rm(lineup1_pos, lineup2_pos, lineup3_pos) #Nominal size: k <- c(6, 5, 4) #Use diag param helper function to get data (n11, n21, n12, n22): linedf <- diag_param(lineup_pres_list, lineup_abs_list, pos_list, k) #Call: wi <- d_weights(linedf)
Checks that number of lineup choices contained in a vector is accurate
datacheck1(lineup_vec, k)
datacheck1(lineup_vec, k)
lineup_vec |
A numeric vector of lineup choices |
k |
Number of members in lineup |
This function ensures that a non-selected lineup member is not accidentally omitted from the dataframe due to lack of selection by all mock witnesses. It functions as a check that the total number of lineup members is accurate.
Checks that number of lineup choices contained in a vector is accurate
datacheck2(lineup_pres, lineup_abs, k1, k2)
datacheck2(lineup_pres, lineup_abs, k1, k2)
lineup_pres |
A numeric vector of lineup choices for a lineup in which the target was present |
lineup_abs |
A numeric vector of lineup choices for a lineup in which the target was absent |
k1 |
Number of targets in TP lineup |
k2 |
Number of targets in TA lineup |
This function ensures that a non-selected lineup member is not accidentally omitted from the dataframe due to lack of selection by all mock witnesses. It functions as a check that the total number of lineup members is accurate
Checks that number of lineup choices contained in a data table is accurate
datacheck3(lineup_table, k)
datacheck3(lineup_table, k)
lineup_table |
A table of lineup choices |
k |
Nominal size (i.e., total number of members in lineup) |
This function ensures that a non-selected lineup member is not accidentally omitted from the data due to lack of selection by all mock witnesses. It functions as a check that the total number of lineup members is accurate.
This function calculates the parameters needed to calculate the diagnosticity ratio for several lineup pairs.
diag_param(lineup_pres_list, lineup_abs_list, pos_list, k)
diag_param(lineup_pres_list, lineup_abs_list, pos_list, k)
lineup_pres_list |
A list containing k vectors of lineup choices for k lineups, in which the target was present |
lineup_abs_list |
A list containing k vectors of lineup choices for k lineups, in which the target was absent |
pos_list |
A list containing k numeric vectors indexing lineup member positions for each lineup pair |
k |
A vector indexing number of members in each lineup pair. Must be specified by user (scalar). |
Lineup pairs consist of one lineup in which the target was present (TP) and one lineup in which the target was absent (TA).
Each lineup pair must occupy corresponding positions in the TA and TP lists.
Example:
For a lineup pair A that consists of (1)TP lineup and (2)TA lineup: A(1) is the first vector in the TP list A(2) is the first vector in the TP list
The order in which nominal size for each lineup pair is listed must also correspond with the positions of each respective lineup in the lineup lists (i.e., if lineup 1 has k = 6, then the first element of vector 'k' = 6)
Data must be in a list format. This allows the function to compare lineups in which the number of choices and number of lineup members differs.
The following warning will appear if vectors comprising lineup lists are of different lengths: longer object length is not a multiple of shorter object length. This does not affect the accuracy of the function and can be ignored.
Returns a dataframe containing:
n11: Number of mock witnesses who identified the suspect in the target present condition
n21: Number of mock witnesses who did not identify the suspect in the target present condition
n12: Number of mock witnesses who identified the suspect in the target absent condition
n13: Number of mock witnesses who did not identify the suspect in the target absent condition
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Malpass, R. S., Tredoux, C., & McQuiston-Surrett, D. (2007). Lineup construction and lineup fairness. In R. Lindsay, D. F. Ross, J. D. Read, & M. P. Toglia (Eds.), Handbook of Eyewitness Psychology, Vol. 2: Memory for people (pp. 155-178). Mahwah, NJ: Lawrence Erlbaum Associates.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
#Target present data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_pres_list <- list(A, B, C) rm(A, B, C) #Target absent data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_abs_list <- list(A, B, C) rm(A, B, C) #Pos list lineup1_pos <- c(1, 2, 3, 4, 5, 6) lineup2_pos <- c(1, 2, 3, 4, 5) lineup3_pos <- c(1, 2, 3, 4) pos_list <- list(lineup1_pos, lineup2_pos, lineup3_pos) rm(lineup1_pos, lineup2_pos, lineup3_pos) #Nominal size: k <- c(6, 5, 4) #Call: linedf <- diag_param(lineup_pres_list, lineup_abs_list, pos_list, k)
#Target present data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_pres_list <- list(A, B, C) rm(A, B, C) #Target absent data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_abs_list <- list(A, B, C) rm(A, B, C) #Pos list lineup1_pos <- c(1, 2, 3, 4, 5, 6) lineup2_pos <- c(1, 2, 3, 4, 5) lineup3_pos <- c(1, 2, 3, 4) pos_list <- list(lineup1_pos, lineup2_pos, lineup3_pos) rm(lineup1_pos, lineup2_pos, lineup3_pos) #Nominal size: k <- c(6, 5, 4) #Call: linedf <- diag_param(lineup_pres_list, lineup_abs_list, pos_list, k)
Computes Wells's adjusted diagnosticity ratio for one lineup pair (see: Tredoux, 1998)
diag_ratio_T(lineup_pres, lineup_abs, pos_pres, pos_abs, k1, k2)
diag_ratio_T(lineup_pres, lineup_abs, pos_pres, pos_abs, k1, k2)
lineup_pres |
A numeric vector of lineup choices for a lineup in which the target was present |
lineup_abs |
A numeric vector of lineup choices for a lineup in which the target was absent |
pos_pres |
A scalar, representing target position in TP lineup. Must be declared by user |
pos_abs |
A scalar, representing target position in TA lineup. Must be declared by user |
k1 |
Number of targets in TP lineup. Must be specified by user (scalar). |
k2 |
Number of targets in TA lineup. Must be specified by user (scalar). |
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Malpass, R. S., Tredoux, C., & McQuiston-Surrett, D. (2007). Lineup construction and lineup fairness. In R. Lindsay, D. F. Ross, J. D. Read, & M. P. Toglia (Eds.), Handbook of Eyewitness Psychology, Vol. 2: Memory for people (pp. 155-178). Mahwah, NJ: Lawrence Erlbaum Associates.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
#Data: lineup_pres <- round(runif(100, 1, 6)) lineup_abs <- round(runif(70, 1, 5)) pos_pres <- 3 pos_abs <- 5 #Call: diag_ratio_T(lineup_pres, lineup_abs, pos_pres, pos_abs, 6, 5) diag_ratio_T(lineup_pres, lineup_abs, 3, 5, 6, 5)
#Data: lineup_pres <- round(runif(100, 1, 6)) lineup_abs <- round(runif(70, 1, 5)) pos_pres <- 3 pos_abs <- 5 #Call: diag_ratio_T(lineup_pres, lineup_abs, pos_pres, pos_abs, 6, 5) diag_ratio_T(lineup_pres, lineup_abs, 3, 5, 6, 5)
Computes Wells' diagnosticity ratio for one lineup pair
diag_ratio_W(lineup_pres, lineup_abs, pos_pres, pos_abs, k1, k2)
diag_ratio_W(lineup_pres, lineup_abs, pos_pres, pos_abs, k1, k2)
lineup_pres |
A numeric vector of lineup choices for a lineup in which the target was present |
lineup_abs |
A numeric vector of lineup choices for a lineup in which the target was absent |
pos_pres |
A scalar, representing target position in TP lineup. Must be declared by user |
pos_abs |
A scalar, representing target position in TA lineup. Must be declared by user |
k1 |
Number of targets in TP lineup. Must be specified by user (scalar). |
k2 |
Number of targets in TA lineup. Must be specified by user (scalar). |
Wells, G. L., & Lindsay, R. C. L. (1980).On estimating the diagnosticity of eyewitness nonidentifications.Psychological Bulletin, 88, 776-784.
Wells, G. L., & Turtle, J. W. (1986). Eyewitness identification: The importance of lineup models. Psychological Bulletin, 99, 320-329.
#Data: lineup_pres <- round(runif(100, 1, 6)) lineup_abs <- round(runif(70, 1, 5)) pos_pres <- 3 pos_abs <- 5 #Call: diag_ratio_W(lineup_pres, lineup_abs, pos_pres, pos_abs, 6, 5) diag_ratio_W(lineup_pres, lineup_abs, 3, 5, 6, 5)
#Data: lineup_pres <- round(runif(100, 1, 6)) lineup_abs <- round(runif(70, 1, 5)) pos_pres <- 3 pos_abs <- 5 #Call: diag_ratio_W(lineup_pres, lineup_abs, pos_pres, pos_abs, 6, 5) diag_ratio_W(lineup_pres, lineup_abs, 3, 5, 6, 5)
Function for computing effective size (Malpass, 1981) counting foils who fall within the CI for chance guessing
eff_size_per_foils(lineup_vec, target_pos, k, conf = 0.95)
eff_size_per_foils(lineup_vec, target_pos, k, conf = 0.95)
lineup_vec |
A numeric vector of lineup choices |
target_pos |
A numeric vector indexing all lineup members |
k |
Number of members in lineup. Must be specified by user (scalar). |
conf |
Desired level of alpha. Defaults to 0.95. May be specified by user (scalar). |
Malpass, R S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5, 299-309.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
#Data: lineup_vec <- round(runif(100, 1, 6)) target_pos <- c(1, 2, 3, 4, 5, 6) #Call: eff_size_per_foils(lineup_vec, target_pos, 6) eff_size_per_foils(lineup_vec, target_pos, conf = 0.95, 6)
#Data: lineup_vec <- round(runif(100, 1, 6)) target_pos <- c(1, 2, 3, 4, 5, 6) #Call: eff_size_per_foils(lineup_vec, target_pos, 6) eff_size_per_foils(lineup_vec, target_pos, conf = 0.95, 6)
Function for comparing effective size of two independent lineups (Tredoux, 1998)
effsize_compare(linedf)
effsize_compare(linedf)
linedf |
A dataframe of lineup data. Contains 2 columns, each of which hold data for 2 independent lineups |
This function is a master function, calling other functions it needs, and reporting results in some detail
Effective size, significance level, and confidence intervals (95 normal theory, percentile & bias-corrected)
Davison, A.C. & Hinkley, D.V. (1997). Bootstrap methods and their application. Cambridge University Press.
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Malpass, R. S., Tredoux, C., & McQuiston-Surrett, D. (2007). Lineup construction and lineup fairness. In R. Lindsay, D. F. Ross, J. D. Read, & M. P. Toglia (Eds.), Handbook of Eyewitness Psychology, Vol. 2: Memory for people (pp. 155-178). Mahwah, NJ: Lawrence Erlbaum Associates.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
boot
: https://cran.r-project.org/web/packages/boot/boot.pdf
#Data: lineup_vec1 <- round(runif(100, 1, 6)) lineup_vec2 <- round(runif(100, 1, 6)) linedf <- as.data.frame(cbind(lineup_vec1, lineup_vec2)) #Call: x <- effsize_compare(linedf)
#Data: lineup_vec1 <- round(runif(100, 1, 6)) lineup_vec2 <- round(runif(100, 1, 6)) linedf <- as.data.frame(cbind(lineup_vec1, lineup_vec2)) #Call: x <- effsize_compare(linedf)
Function for computing Effective Size
esize_m(lineup_table, k, both = FALSE)
esize_m(lineup_table, k, both = FALSE)
lineup_table |
A table of lineup choices |
k |
Number of members in lineup. Must be specified by user (scalar). |
both |
Defaults to FALSE. Returns Tredoux's adjusted effective size estimate. If TRUE, provides both Malpass's (1981) and Makpass's adjusted (see: Tredoux, 1998) calculations of effective size. |
Reduces the size of a lineup from a (corrected) nominal starting value by the degree to which members are, in sum, chosen below the level of chance expectation.
Malpass's original & adjusted estimates of effective size
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Malpass, R. S., Tredoux, C., & McQuiston-Surrett, D. (2007). Lineup construction and lineup fairness. In R. Lindsay, D. F. Ross, J. D. Read, & M. P. Toglia (Eds.), Handbook of Eyewitness Psychology, Vol. 2: Memory for people (pp. 155-178). Mahwah, NJ: Lawrence Erlbaum Associates.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
#Data: lineup_vec <- round(runif(100, 1, 6)) #Call: esize_m(lineup_vec, 6, both = TRUE) esize_m(lineup_vec, 6)
#Data: lineup_vec <- round(runif(100, 1, 6)) #Call: esize_m(lineup_vec, 6, both = TRUE) esize_m(lineup_vec, 6)
Base function for computing bootstrapped effective size
esize_m_boot(lineup_vec, d, k)
esize_m_boot(lineup_vec, d, k)
lineup_vec |
A vector of lineup choices |
d |
Indices for bootstrap resampling |
k |
A vector indexing number of members in each lineup pair. Must be specified by user (scalar). |
Function to call when bootstrap resampling using boot function (in package 'boot')
If printarg=FALSE, provides only Malpass's priginal calculation of effective size
Davison, A.C. & Hinkley, D.V. (1997). Bootstrap methods and their application. Cambridge University Press.
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Malpass, R. S., Tredoux, C., & McQuiston-Surrett, D. (2007). Lineup construction and lineup fairness. In R. Lindsay, D. F. Ross, J. D. Read, & M. P. Toglia (Eds.), Handbook of Eyewitness Psychology, Vol. 2: Memory for people (pp. 155-178). Mahwah, NJ: Lawrence Erlbaum Associates.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
boot
: https://cran.r-project.org/web/packages/boot/boot.pdf
#Data: lineup_vec <- round(runif(100, 1, 6)) #Get boot object: bootobject <- boot::boot(lineup_vec, esize_m_boot, k = 6, R=1000) bootobject #To get confidence intervals: cis <- boot::boot.ci(bootobject, conf = 0.95, type = "all")
#Data: lineup_vec <- round(runif(100, 1, 6)) #Get boot object: bootobject <- boot::boot(lineup_vec, esize_m_boot, k = 6, R=1000) bootobject #To get confidence intervals: cis <- boot::boot.ci(bootobject, conf = 0.95, type = "all")
Function for generating Effective Size (Tredoux, 1998)
esize_T(lineup_table)
esize_T(lineup_table)
lineup_table |
A table of lineup choices |
Reduces the size of a lineup from a (corrected) nominal starting value by the degree to which members are, in sum, chosen below the level of chance expectation.
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Malpass, R. S., Tredoux, C., & McQuiston-Surrett, D. (2007). Lineup construction and lineup fairness. In R. Lindsay, D. F. Ross, J. D. Read, & M. P. Toglia (Eds.), Handbook of Eyewitness Psychology, Vol. 2: Memory for people (pp. 155-178). Mahwah, NJ: Lawrence Erlbaum Associates.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L., Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
#Data: lineup_vec <- round(runif(100, 1, 6)) lineup_table <- table(lineup_vec) #Call: e <- esize_T(lineup_table)
#Data: lineup_vec <- round(runif(100, 1, 6)) lineup_table <- table(lineup_vec) #Call: e <- esize_T(lineup_table)
Base function for generating boostrapped Effective Size (Tredoux, 1998)
esize_T_boot(lineup_table, d)
esize_T_boot(lineup_table, d)
lineup_table |
A table of lineup choices |
d |
Indices for bootstrap resampling |
Reduces the size of a lineup from a (corrected) nominal starting value by the degree to which members are, in sum, chosen below the level of chance expectation.
Davison, A.C. & Hinkley, D.V. (1997). Bootstrap methods and their application. Cambridge University Press.
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Malpass, R. S., Tredoux, C., & McQuiston-Surrett, D. (2007). Lineup construction and lineup fairness. In R. Lindsay, D. F. Ross, J. D. Read, & M. P. Toglia (Eds.), Handbook of Eyewitness Psychology, Vol. 2: Memory for people (pp. 155-178). Mahwah, NJ: Lawrence Erlbaum Associates.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L., Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
boot
: https://cran.r-project.org/web/packages/boot/boot.pdf
Function for generating Effective Size (Tredoux, 1998) with CIs from normal theory
esize_T_ci_n(lineup_table, alpha)
esize_T_ci_n(lineup_table, alpha)
lineup_table |
A table of lineup choices |
alpha |
Alpha level to be declared by user (scalar) |
Reduces the size of a lineup from a (corrected) nominal starting value by the degree to which members are, in sum, chosen below the level of chance expectation
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Malpass, R. S., Tredoux, C., & McQuiston-Surrett, D. (2007). Lineup construction and lineup fairness. In R. Lindsay, D. F. Ross, J. D. Read, & M. P. Toglia (Eds.), Handbook of Eyewitness Psychology, Vol. 2: Memory for people (pp. 155-178). Mahwah, NJ: Lawrence Erlbaum Associates.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
#Data: lineup_vec <- round(runif(100, 1, 6)) lineup_table <- table(lineup_vec) #Call: e_ci <- esize_T_ci_n(lineup_table, .95)
#Data: lineup_vec <- round(runif(100, 1, 6)) lineup_table <- table(lineup_vec) #Call: e_ci <- esize_T_ci_n(lineup_table, .95)
Function to compute the degree to which each face in a set of faces loads onto a common factor computed from the faces.
face_sim()
face_sim()
The faces need to be standardized for inter-pupil distance, and for pupil location prior to running the function
The user will be asked to choose a set of faces through a dialog box. These should be jpeg files.
There is no argument to the function; it gets what it needs from the dialog box. The function prints the lineup array to the viewer pane in R, and reports the loading of each face on the first common factor in a factor analysis (using fa in package psych)
Tredoux, C. (2002). A direct measure of facial similarity and its relation to human similarity perceptions. Journal of Experimental Psychology: Applied, 8(3), 180-193. doi:10.1037/1076-898x.8.3.180
This function computes functional size (N/D), where N = number of mock witnesses, & D = number of mock witnesses choosing the target
func_size(lineup_vec, target_pos)
func_size(lineup_vec, target_pos)
lineup_vec |
A numeric vector of lineup choices |
target_pos |
A scalar, representing target position in lineup. Must be declared by user |
An estimation of the number of plausible lineup members in a given lineup.
Functional size of lineup
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
#Data: lineup_vec <- round(runif(100, 1, 6)) target_pos <- 3 #Call: x <- func_size(lineup_vec, target_pos) x <- func_size(lineup_vec, 3)
#Data: lineup_vec <- round(runif(100, 1, 6)) target_pos <- 3 #Call: x <- func_size(lineup_vec, target_pos) x <- func_size(lineup_vec, 3)
This function is a master function, calling other functions it needs, and reporting results in some detail
func_size_report(lineup_vec, target_pos, k, R)
func_size_report(lineup_vec, target_pos, k, R)
lineup_vec |
A numeric vector of lineup choices |
target_pos |
A scalar, representing target position in lineup. Must be declared by user |
k |
Number of members in lineup. Must be specified by user (scalar). |
R |
Number of bootstrap samples. Defaults to 1000 |
Function depends on functions from package 'boot'
Davison, A.C. & Hinkley, D.V. (1997). Bootstrap methods and their application. Cambridge University Press.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
boot
: https://cran.r-project.org/web/packages/boot/boot.pdf
#Data: lineup_vec <- round(runif(100, 1, 6)) target_pos <- 3 #Call: x <- func_size_report(lineup_vec, target_pos, 6) x <- func_size_report(lineup_vec, 3, 6)
#Data: lineup_vec <- round(runif(100, 1, 6)) target_pos <- 3 #Call: x <- func_size_report(lineup_vec, target_pos, 6) x <- func_size_report(lineup_vec, 3, 6)
This function is a base function for the bootstrapping that ensues to compute bootstrapped confidence intervals for the estimate of functional size
func_size.boot(lineup_vec, d = d, target_pos)
func_size.boot(lineup_vec, d = d, target_pos)
lineup_vec |
A numeric vector of lineup choices |
d |
Indices for bootstrap resampling |
target_pos |
A scalar, representing position of target in lineup. Must be declared by user |
Function is called bootstrap resampling using boot function (in package 'boot') This function is never called by the user - it is called in the functional size master function
Davison, A.C. & Hinkley, D.V. (1997). Bootstrap methods and their application. Cambridge University Press.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
boot
: https://cran.r-project.org/web/packages/boot/boot.pdf
Function for computing arbitrary percentile of bootstrapped lineup proportion
gen_boot_propci(lineuprops, perc = 0.05)
gen_boot_propci(lineuprops, perc = 0.05)
lineuprops |
A vector of bootstrapped lineup proportions |
perc |
Percentile to be computed. Must be declared by user (scalar) Defaults to .05 |
Can be used to calculate confidence intervals at desired level of alpha
Arbitrary percentile of bootstrapped lineup proportion
#Data: lineup_vec <- round(runif(100, 1, 6)) target_pos <- 3 k <- 6 #Bootstrap data: lineup_boot_df <- gen_boot_samples(lineup_vec, 1000) #Compute proportion for bootstrap samples: lineuprops <- gen_lineup_prop(lineup_boot_df, target_pos, 6) #Get boot CIs: prop_bootci_lower <- gen_boot_propci(lineuprops, perc = .025) prop_bootci_upper <- gen_boot_propci(lineuprops, perc = .975)
#Data: lineup_vec <- round(runif(100, 1, 6)) target_pos <- 3 k <- 6 #Bootstrap data: lineup_boot_df <- gen_boot_samples(lineup_vec, 1000) #Compute proportion for bootstrap samples: lineuprops <- gen_lineup_prop(lineup_boot_df, target_pos, 6) #Get boot CIs: prop_bootci_lower <- gen_boot_propci(lineuprops, perc = .025) prop_bootci_upper <- gen_boot_propci(lineuprops, perc = .975)
Function for computing mean. med and se of boot proportion
gen_boot_propmean_se(lineuprops)
gen_boot_propmean_se(lineuprops)
lineuprops |
A dataframe of bootstrapped lineup proportions |
Mean, median, standard deviation, standard error & 95 CIs of lineup proportion across a bootstrapped dataframe
#Data: lineup_vec <- round(runif(100, 1, 6)) target_pos <- 3 #Bootstrap data: lineup_boot_df <- gen_boot_samples(lineup_vec, 1000) #Compute proportion for bootstrap samples: lineuprops <- gen_lineup_prop(lineup_boot_df, target_pos = 3, k = 6) #Call: gen_boot_propmean_se(lineuprops) #OR: lineuprops <- boot::boot(lineup_vec, lineup_prop_boot, target_pos = 3, R = 1000) gen_boot_propmean_se(lineuprops$t)
#Data: lineup_vec <- round(runif(100, 1, 6)) target_pos <- 3 #Bootstrap data: lineup_boot_df <- gen_boot_samples(lineup_vec, 1000) #Compute proportion for bootstrap samples: lineuprops <- gen_lineup_prop(lineup_boot_df, target_pos = 3, k = 6) #Call: gen_boot_propmean_se(lineuprops) #OR: lineuprops <- boot::boot(lineup_vec, lineup_prop_boot, target_pos = 3, R = 1000) gen_boot_propmean_se(lineuprops$t)
Function for generating bootstrapped samples from 1 vector of lineup data
gen_boot_samples(lineup_vec, bootno)
gen_boot_samples(lineup_vec, bootno)
lineup_vec |
A numeric vectors of lineup choices |
bootno |
Number of bootstrap samples |
A dataframe of bootstrapped lineup data
#Data: lineup_vec <- round(runif(100,1,6)) bootno <- 1000 #Call: bootdf <- gen_boot_samples(lineup_vec, bootno)
#Data: lineup_vec <- round(runif(100,1,6)) bootno <- 1000 #Call: bootdf <- gen_boot_samples(lineup_vec, bootno)
Function for generating bootstrapped samples for of k vectors of lineup choices
gen_boot_samples_list(lineup_list, bootno)
gen_boot_samples_list(lineup_list, bootno)
lineup_list |
A list containing k vectors of lineup choices for k lineups, in which the target was either absent or present |
bootno |
Number of bootstrap samples |
A list of bootstrapped lineup data Length of list = no. of boostrap sample draws
#Data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) linelist <- list(A, B, C) rm(A, B, C) bootno <- 1000 #Call: bootdata <- gen_boot_samples_list(linelist, bootno)
#Data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) linelist <- list(A, B, C) rm(A, B, C) bootno <- 1000 #Call: bootdata <- gen_boot_samples_list(linelist, bootno)
Function for computing Effective Size (Tredoux, 1998) on lineups contained as columns in a df, usually from a bootstrapped sample
gen_esize_m(lineup_boot_df, k)
gen_esize_m(lineup_boot_df, k)
lineup_boot_df |
A dataframe containing bootstrapped samples of lineup data |
k |
Number of members in lineup. Must be specified by user (scalar). |
This function computes effective size for k lineups simultaneously.
A vector of effective size calculations for each lineup in bootstrapped df
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Malpass, R. S., Tredoux, C., & McQuiston-Surrett, D. (2007). Lineup construction and lineup fairness. In R. Lindsay, D. F. Ross, J. D. Read, & M. P. Toglia (Eds.), Handbook of Eyewitness Psychology, Vol. 2: Memory for people (pp. 155-178). Mahwah, NJ: Lawrence Erlbaum Associates.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
#Data: lineup_vec <- round(runif(100,1,6)) bootdf <- gen_boot_samples(lineup_vec, 1000) #Call: esize_vec <- gen_esize_m(bootdf, 6)
#Data: lineup_vec <- round(runif(100,1,6)) bootdf <- gen_boot_samples(lineup_vec, 1000) #Call: esize_vec <- gen_esize_m(bootdf, 6)
Function for computing Effective Size (Malpass, 1981, as adjusted by Tredoux, 1998) with CIs from bootstrap df of lineups
gen_esize_m_ci(lineupsizes, perc = 0.05)
gen_esize_m_ci(lineupsizes, perc = 0.05)
lineupsizes |
A vector of bootstrapped effective sizes |
perc |
Defaults to .05. Can be specified by user, according to desired level of alpha (scalar) |
Confidence intervals for effective size
#Data: lineup_vec <- round(runif(100, 1, 6)) k <- 6 #Use gen_boot_samples to get bootstrapped data: bootdata <- gen_boot_samples(lineup_vec, 1000) #Compute effective size over df of bootstrapped data: lineupsizes <- gen_esize_m(bootdata, 6) #Call: gen_esize_m_ci(lineupsizes) gen_esize_m_ci(lineupsizes, perc = .025) gen_esize_m_ci(lineupsizes, perc = .975)
#Data: lineup_vec <- round(runif(100, 1, 6)) k <- 6 #Use gen_boot_samples to get bootstrapped data: bootdata <- gen_boot_samples(lineup_vec, 1000) #Compute effective size over df of bootstrapped data: lineupsizes <- gen_esize_m(bootdata, 6) #Call: gen_esize_m_ci(lineupsizes) gen_esize_m_ci(lineupsizes, perc = .025) gen_esize_m_ci(lineupsizes, perc = .975)
Function for computing lineup proportion over a dataframe
gen_lineup_prop(lineup_boot_df, target_pos, k)
gen_lineup_prop(lineup_boot_df, target_pos, k)
lineup_boot_df |
Dataframe of lineup choices (usually a bootstrapped set) |
target_pos |
A scalar, representing target position in lineup. Must be declared by user. |
k |
A vector indexing number of members in each lineup pair (nominal size). Must be specified by user (scalar). |
A vector of bootstrapped proportions, indicating the frequency with which a target was identified in a lineup Length of vector = number of bootstrap sample draws
#Data lineup_vec <- round(runif(100, 1, 6)) target_pos <- 3 #Get bootstrapped data: lineup_boot_df <- gen_boot_samples(lineup_vec, 1000) #Call: lineuprops <- gen_lineup_prop(lineup_boot_df, 3, 6)
#Data lineup_vec <- round(runif(100, 1, 6)) target_pos <- 3 #Get bootstrapped data: lineup_boot_df <- gen_boot_samples(lineup_vec, 1000) #Call: lineuprops <- gen_lineup_prop(lineup_boot_df, 3, 6)
A function that takes a table of lineup choices and generates a vector of raw lineup data
gen_linevec(lineup_table, k)
gen_linevec(lineup_table, k)
lineup_table |
A table of lineup choices |
k |
Nominal size (i.e.,total number of lineup members). Must be declared by user |
Returns a vector of lineup choices
#Data: lineup_vec <- round(runif(100, 1, 6)) lineup_table <- table(lineup_vec) #Call: lineup_vec <- gen_linevec(lineup_table, 3)
#Data: lineup_vec <- round(runif(100, 1, 6)) lineup_table <- table(lineup_vec) #Call: lineup_vec <- gen_linevec(lineup_table, 3)
This function provides assesses the homogeneity of the diagnosticity ratio of k lineup pairs.
homog_diag(lineup_pres_list, lineup_abs_list, pos_list, k)
homog_diag(lineup_pres_list, lineup_abs_list, pos_list, k)
lineup_pres_list |
A list containing k vectors of lineup choices for k lineups, in which the target was present |
lineup_abs_list |
A list containing k vectors of lineup choices for k lineups, in which the target was absent |
pos_list |
A numeric vector indexing lineup member positions for the target present & absent conditions. |
k |
A vector indexing number of members in each lineup pair (nominal size). Must be specified by user (scalar). |
Master function for assessing homogeneity of diagnosticity ratio for k independent lineups.
Computes diagnosticity ratio with chi-squared estimate and significance level for k lineup pairs
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Malpass, R. S., Tredoux, C., & McQuiston-Surrett, D. (2007). Lineup construction and lineup fairness. In R. Lindsay, D. F. Ross, J. D. Read, & M. P. Toglia (Eds.), Handbook of Eyewitness Psychology, Vol. 2: Memory for people (pp. 155-178). Mahwah, NJ: Lawrence Erlbaum Associates.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
#Target present data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_pres_list <- list(A, B, C) rm(A, B, C) #Target absent data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_abs_list <- list(A, B, C) rm(A, B, C) #Pos list lineup1_pos <- c(1, 2, 3, 4, 5, 6) lineup2_pos <- c(1, 2, 3, 4, 5) lineup3_pos <- c(1, 2, 3, 4) pos_list <- list(lineup1_pos, lineup2_pos, lineup3_pos) rm(lineup1_pos, lineup2_pos, lineup3_pos) #Nominal size: k <- c(6, 5, 4) #Call: homog_diag(lineup_pres_list, lineup_abs_list, pos_list, k)
#Target present data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_pres_list <- list(A, B, C) rm(A, B, C) #Target absent data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_abs_list <- list(A, B, C) rm(A, B, C) #Pos list lineup1_pos <- c(1, 2, 3, 4, 5, 6) lineup2_pos <- c(1, 2, 3, 4, 5) lineup3_pos <- c(1, 2, 3, 4) pos_list <- list(lineup1_pos, lineup2_pos, lineup3_pos) rm(lineup1_pos, lineup2_pos, lineup3_pos) #Nominal size: k <- c(6, 5, 4) #Call: homog_diag(lineup_pres_list, lineup_abs_list, pos_list, k)
Function for computing bootstrapped estimates of homogeneity of diagnosticity ratio
homog_diag_boot(lineup_pres_list, lineup_abs_list, k, R = 100)
homog_diag_boot(lineup_pres_list, lineup_abs_list, k, R = 100)
lineup_pres_list |
A list containing k vectors of lineup choices for k lineups, in which the target was present |
lineup_abs_list |
A list containing k vectors of lineup choices for k lineups, in which the target was absent |
k |
Number of members in lineup. Must be specified by user (scalar). |
R |
Number of bootstrap replications. Defaults to R = 100. |
Computes bootstrapped diagnosticity ratio with chi-squared estimate, significance level and confidence intervals for k lineup pairs
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Malpass, R. S., Tredoux, C., & McQuiston-Surrett, D. (2007). Lineup construction and lineup fairness. In R. Lindsay, D. F. Ross, J. D. Read, & M. P. Toglia (Eds.), Handbook of Eyewitness Psychology, Vol. 2: Memory for people (pp. 155-178). Mahwah, NJ: Lawrence Erlbaum Associates.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
#Target present data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_pres_list <- list(A, B, C) rm(A, B, C) #Target absent data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_abs_list <- list(A, B, C) rm(A, B, C)
#Target present data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_pres_list <- list(A, B, C) rm(A, B, C) #Target absent data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_abs_list <- list(A, B, C) rm(A, B, C)
Function for generating I component of effective size
i_esize_T(lineup_table)
i_esize_T(lineup_table)
lineup_table |
A table of lineup choices |
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Malpass, R. S., Tredoux, C., & McQuiston-Surrett, D. (2007). Lineup construction and lineup fairness. In R. Lindsay, D. F. Ross, J. D. Read, & M. P. Toglia (Eds.), Handbook of Eyewitness Psychology, Vol. 2: Memory for people (pp. 155-178). Mahwah, NJ: Lawrence Erlbaum Associates.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
#Data: lineup_vec <- round(runif(100, 1, 6)) lineup_table <- table(lineup_vec) #Call: i <- i_esize_T(lineup_table)
#Data: lineup_vec <- round(runif(100, 1, 6)) lineup_table <- table(lineup_vec) #Call: i <- i_esize_T(lineup_table)
A dataframe of lineup choices for 1 trial; real data from a Doob & Kirshenbaum (1973) article. This article was the first to discuss lineup size 1 column x 42 observations
42 mock witnesses Nominal size is 6 Target position is 4
data(line73)
data(line73)
An object of class data.frame
with 42 rows and 1 columns.
Doob, A. N., & Kirshenbaum, H. M. (1973). Bias in police lineups-Partial remembering. Journal of Police Science and Administration, 1, 287-293.
Computes bootstrapped confidence intervals for lineup proportion
lineup_boot_allprop(lineup_vec, k, conf = 0.95)
lineup_boot_allprop(lineup_vec, k, conf = 0.95)
lineup_vec |
A numeric vector of lineup choices |
k |
Number of targets in lineup. Must be specified by user (scalar). |
conf |
Desired level of alpha. Defaults to 0.95. May be specified by user (scalar). |
Function that computes bootstrapped lineup proportion using 1000 bootstrap draws Calls 'boot function in 'boot' package
Returns a vector of bias corrected confidence intervals for lineup proportion for each member in a lineup
Davison, A.C. & Hinkley, D.V. (1997). Bootstrap methods and their application. Cambridge University Press.
Wells, G. L., Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
boot
: https://cran.r-project.org/web/packages/boot/boot.pdf
#Data: lineup_vec <- round(runif(100, 1, 6)) #Call: lineuprops_ci <- lineup_boot_allprop(lineup_vec, k= 6) lineuprops_ci <- lineup_boot_allprop(lineup_vec, k= 6, conf = 0.975)
#Data: lineup_vec <- round(runif(100, 1, 6)) #Call: lineuprops_ci <- lineup_boot_allprop(lineup_vec, k= 6) lineuprops_ci <- lineup_boot_allprop(lineup_vec, k= 6, conf = 0.975)
Base function for computing bootstrapped lineup proportion for a lineup member
lineup_prop_boot(lineup_vec, d, target_pos)
lineup_prop_boot(lineup_vec, d, target_pos)
lineup_vec |
A numeric vector of lineup choices |
d |
Indices for bootstrap sample. Argument used by boot function to select samples for bootstrapping |
target_pos |
A scalar, representing target position in lineup. Must be declared by user |
Function to call when bootstrap resampling using boot function
Davison, A.C. & Hinkley, D.V. (1997). Bootstrap methods and their application. Cambridge University Press.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
boot
: https://cran.r-project.org/web/packages/boot/boot.pdf
lineup_vec <- round(runif(100, 1, 6)) bootobject <- boot::boot(lineup_vec, lineup_prop_boot, target_pos = 3, R = 1000) cis <- boot::boot.ci(bootobject, conf = 0.95, type = "all")
lineup_vec <- round(runif(100, 1, 6)) bootobject <- boot::boot(lineup_vec, lineup_prop_boot, target_pos = 3, R = 1000) cis <- boot::boot.ci(bootobject, conf = 0.95, type = "all")
Computes the proportion of mock witnesses identifying a particular lineup member
lineup_prop_tab(lineup_table, target_pos)
lineup_prop_tab(lineup_table, target_pos)
lineup_table |
A table of lineup choices |
target_pos |
A scalar, representing target position in lineup. Must be declared by user |
Returns a proportion indicating the frequency with which a lineup member was selected
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
#Data: lineup_vec <- round(runif(100, 1)) lineup_table <- table(lineup_vec) #Call: lineup_prop_tab(lineup_table, 3) lineup_prop_tab(table(lineup_vec), 2)
#Data: lineup_vec <- round(runif(100, 1)) lineup_table <- table(lineup_vec) #Call: lineup_prop_tab(lineup_table, 3) lineup_prop_tab(table(lineup_vec), 2)
Computes the proportion of mock witnesses identifying a particular lineup member
lineup_prop_vec(lineup_vec, target_pos, k)
lineup_prop_vec(lineup_vec, target_pos, k)
lineup_vec |
A numeric vector of lineup choices |
target_pos |
Suspect/lineup member position. Must be declared by user (scalar). |
k |
Nominal size (i.e., total number of members in lineup). Must be specified by user (scalar). |
Returns a proportion indicating the frequency with which a target was identified in a lineup
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
#Data: lineup_vec <- round(runif(100, 1, 6)) #Call: lineup_prop_vec(lineup_vec, 3, 6)
#Data: lineup_vec <- round(runif(100, 1, 6)) #Call: lineup_prop_vec(lineup_vec, 3, 6)
Computes ln of diagnosticity ratio: ln(d)
ln_diag_ratio(linedf)
ln_diag_ratio(linedf)
linedf |
A dataframe of parameters for computing diagnosticity ratio |
To get linedf, use the diag_param helper function
diag_param returns a dataframe containing the following:
n11: Number of mock witnesses who identified the suspect in the target present condition
n21: Number of mock witnesses who did not identify the suspect in the target present condition
n12: Number of mock witnesses who identified the suspect in the target absent condition
n13: Number of mock witnesses who did not identify the suspect in the target absent condition
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Malpass, R. S., Tredoux, C., & McQuiston-Surrett, D. (2007). Lineup construction and lineup fairness. In R. Lindsay, D. F. Ross, J. D. Read, & M. P. Toglia (Eds.), Handbook of Eyewitness Psychology, Vol. 2: Memory for people (pp. 155-178). Mahwah, NJ: Lawrence Erlbaum Associates.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
#Target present data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_pres_list <- list(A, B, C) rm(A, B, C) #Target absent data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_abs_list <- list(A, B, C) rm(A, B, C) #Pos list lineup1_pos <- c(1, 2, 3, 4, 5, 6) lineup2_pos <- c(1, 2, 3, 4, 5) lineup3_pos <- c(1, 2, 3, 4) pos_list <- list(lineup1_pos, lineup2_pos, lineup3_pos) rm(lineup1_pos, lineup2_pos, lineup3_pos) #Nominal size: k <- c(6, 5, 4) #Use diag param helper function to get data (n11, n21, n12, n22): linedf <- diag_param(lineup_pres_list, lineup_abs_list, pos_list, k) #Call: lnd <- ln_diag_ratio(linedf)
#Target present data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_pres_list <- list(A, B, C) rm(A, B, C) #Target absent data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_abs_list <- list(A, B, C) rm(A, B, C) #Pos list lineup1_pos <- c(1, 2, 3, 4, 5, 6) lineup2_pos <- c(1, 2, 3, 4, 5) lineup3_pos <- c(1, 2, 3, 4) pos_list <- list(lineup1_pos, lineup2_pos, lineup3_pos) rm(lineup1_pos, lineup2_pos, lineup3_pos) #Nominal size: k <- c(6, 5, 4) #Use diag param helper function to get data (n11, n21, n12, n22): linedf <- diag_param(lineup_pres_list, lineup_abs_list, pos_list, k) #Call: lnd <- ln_diag_ratio(linedf)
Function to compute and plot an ROC curve for data from an eyewitness experiment, where accuracy is recorded for target present and target absent lineups
make_roc(df_confacc)
make_roc(df_confacc)
df_confacc |
A dataframe with two columns, named confidence and accuracy (where accuracy = binary accuracy) |
The approach is outlined in several papers by Mickes, Wixted, Gronlund, Clark, and others (see References)
This function is a user level function. It chains the two roc functions together. The user must pass a dataframe, with one column indicating confidence, and another accuracy, and these must be named as such.
The approach is outlined in several papers by Mickes, Wixted, Gronlund, Clark, and others (see references)
An ROC object of package pROC
Gronlund, S. D., Wixted, J. T., & Mickes, L. (2014). Evaluating eyewitness identification procedures using receiver operating characteristic analysis. Current Directions in Psychological Science, 23(1), 3-10.
#Data: data(mickwick) #Call: make_roc(mickwick)
#Data: data(mickwick) #Call: make_roc(mickwick)
Function to compute and plot an ROC curve for data from an eyewitness experiment, where accuracy is recorded for target present and target absent lineups
make_rocdata(df_confacc)
make_rocdata(df_confacc)
df_confacc |
A df with two columns, confidence and accuracy, where accuracy = binary accuracy. |
An ROC object of package pROC
Several helper functions that compute bootcis from proportions
makevec_prop(prop, n)
makevec_prop(prop, n)
prop |
A dataframe of bootstrapped proportions |
n |
Number of lineup members |
Data capturing confidence and accuracy for a lineup trial
data(mickwick)
data(mickwick)
An object of class tbl_df
(inherits from tbl
, data.frame
) with 100 rows and 2 columns.
mickwick
A dataframe containing real lineup data.
3 columns x 94 observations.
The first column simply provides the participant number, whilst the second and third contain data for each participant's choice (i.e., the position of the lineup member that they identified) and a confidence score for each choice.
In the field of eyewitness testimony, it is common for participants to rate how confident they are that they have accurately identified the perpetrator. Here, confidence is recorded as a percentage.
This lineup has the following parameters:
94 mock witness choices
Target position is 7
Nominal size is 9
data(mockdata)
data(mockdata)
An object of class tbl_df
(inherits from tbl
, data.frame
) with 94 rows and 3 columns.
A data file containing lineup data for 3 independent lineups. 133 rows x 3 columns. Each lineup trial consisted of 133 mock witnesses & 8 lineup members.
: Target position for lineup 1 is 3
: Target position for lineup 2 is 6
: Target position for lineup 3 is 2
data(nortje2012)
data(nortje2012)
An object of class tbl_df
(inherits from tbl
, data.frame
) with 133 rows and 3 columns.
Helper function that repeats a number k times
rep_index(index, num)
rep_index(index, num)
index |
Number to be repeated |
num |
Number of times to repeat index |
Can be used to create vectors of lineup data
rep_index(1, 10)
rep_index(1, 10)
Helper function to rotate vector
rot_vector(lineup_vec)
rot_vector(lineup_vec)
lineup_vec |
A vector of lineup data |
Helper function
show_lineup(file_list)
show_lineup(file_list)
file_list |
A selection of image files (raw data) |
Computes the variance of the diagnosticity ratio for a lineup pair
var_diag_ratio(lineup_pres, lineup_abs, pos_pres, pos_abs, k1, k2)
var_diag_ratio(lineup_pres, lineup_abs, pos_pres, pos_abs, k1, k2)
lineup_pres |
A numeric vector of lineup choices for a lineup in which the target was present |
lineup_abs |
A numeric vector of lineup choices for a lineup in which the target was absent |
pos_pres |
A scalar, representing target position in TP lineup. Must be declared by user |
pos_abs |
A scalar, representing target position in TA lineup. Must be declared by user |
k1 |
Number of targets in TP lineup. Must be specified by user (scalar). |
k2 |
Number of targets in TA lineup. Must be specified by user (scalar). |
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Malpass, R. S., Tredoux, C., & McQuiston-Surrett, D. (2007). Lineup construction and lineup fairness. In R. Lindsay, D. F. Ross, J. D. Read, & M. P. Toglia (Eds.), Handbook of Eyewitness Psychology, Vol. 2: Memory for people (pp. 155-178). Mahwah, NJ: Lawrence Erlbaum Associates.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
#Data: lineup_pres <- round(runif(100, 1, 6)) lineup_abs <- round(runif(100, 1, 6)) pos_pres <- 3 pos_abs <- 4 #Call: var_d <- var_diag_ratio(lineup_pres, lineup_abs, pos_pres, pos_abs, 6, 6) var_d <- var_diag_ratio(lineup_pres, lineup_abs, 3, 4, 6, 6)
#Data: lineup_pres <- round(runif(100, 1, 6)) lineup_abs <- round(runif(100, 1, 6)) pos_pres <- 3 pos_abs <- 4 #Call: var_d <- var_diag_ratio(lineup_pres, lineup_abs, pos_pres, pos_abs, 6, 6) var_d <- var_diag_ratio(lineup_pres, lineup_abs, 3, 4, 6, 6)
Function to compute variance of ln(d) for k lineup pairs
var_lnd(linedf)
var_lnd(linedf)
linedf |
A dataframe of parameters for computing diagnosticity ratio |
To get linedf, use the diag_param helper function
diag_param returns a dataframe containing the following:
n11: Number of mock witnesses who identified the suspect in the target present condition
n21: Number of mock witnesses who did not identify the suspect in the target present condition
n12: Number of mock witnesses who identified the suspect in the target absent condition
n13: Number of mock witnesses who did not identify the suspect in the target absent condition
A dataframe containing ln of the variance of the diagnosticity ratio for each lineup.
Malpass, R. S. (1981). Effective size and defendant bias in eyewitness identification lineups. Law and Human Behavior, 5(4), 299-309.
Malpass, R. S., Tredoux, C., & McQuiston-Surrett, D. (2007). Lineup construction and lineup fairness. In R. Lindsay, D. F. Ross, J. D. Read, & M. P. Toglia (Eds.), Handbook of Eyewitness Psychology, Vol. 2: Memory for people (pp. 155-178). Mahwah, NJ: Lawrence Erlbaum Associates.
Tredoux, C. G. (1998). Statistical inference on measures of lineup fairness. Law and Human Behavior, 22(2), 217-237.
Tredoux, C. (1999). Statistical considerations when determining measures of lineup size and lineup bias. Applied Cognitive Psychology, 13, S9-S26.
Wells, G. L.,Leippe, M. R., & Ostrom, T. M. (1979). Guidelines for empirically assessing the fairness of a lineup. Law and Human Behavior, 3(4), 285-293.
#Target present data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_pres_list <- list(A, B, C) rm(A, B, C) #Target absent data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_abs_list <- list(A, B, C) rm(A, B, C) #Pos list lineup1_pos <- c(1, 2, 3, 4, 5, 6) lineup2_pos <- c(1, 2, 3, 4, 5) lineup3_pos <- c(1, 2, 3, 4) pos_list <- list(lineup1_pos, lineup2_pos, lineup3_pos) rm(lineup1_pos, lineup2_pos, lineup3_pos) #Nominal size: k <- c(6, 5, 4) #Use diag param helper function to get data (n11, n21, n12, n22): linedf <- diag_param(lineup_pres_list, lineup_abs_list, pos_list, k) #Call: var <- var_lnd(linedf)
#Target present data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_pres_list <- list(A, B, C) rm(A, B, C) #Target absent data: A <- round(runif(100,1,6)) B <- round(runif(70,1,5)) C <- round(runif(20,1,4)) lineup_abs_list <- list(A, B, C) rm(A, B, C) #Pos list lineup1_pos <- c(1, 2, 3, 4, 5, 6) lineup2_pos <- c(1, 2, 3, 4, 5) lineup3_pos <- c(1, 2, 3, 4) pos_list <- list(lineup1_pos, lineup2_pos, lineup3_pos) rm(lineup1_pos, lineup2_pos, lineup3_pos) #Nominal size: k <- c(6, 5, 4) #Use diag param helper function to get data (n11, n21, n12, n22): linedf <- diag_param(lineup_pres_list, lineup_abs_list, pos_list, k) #Call: var <- var_lnd(linedf)