Learn R Programming

r4lineups (version 0.1.1)

lineup_boot_allprop: Confidence intervals for lineup proportion

Description

Computes bootstrapped confidence intervals for lineup proportion

Usage

lineup_boot_allprop(lineup_vec, k, conf = 0.95)

Arguments

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).

Value

Returns a vector of bias corrected confidence intervals for lineup proportion for each member in a lineup

Details

Function that computes bootstrapped lineup proportion using 1000 bootstrap draws Calls 'boot function in 'boot' package

References

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.

See Also

boot: https://cran.r-project.org/web/packages/boot/boot.pdf

Examples

Run this code
# NOT RUN {
#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)

# }

Run the code above in your browser using DataLab