View source: R/bias_effective_distributions.R
| plot_lineup_bias_distribution | R Documentation |
Plot Bootstrap Distribution of Lineup Bias
plot_lineup_bias_distribution(
boot_values,
target_pos = NULL,
bins = NULL,
binwidth = NULL
)
boot_values |
Numeric vector of bootstrap estimates, as returned by
|
target_pos |
Optional target position label for title. |
bins |
Number of histogram bins. Defaults to |
binwidth |
Histogram bin width. Defaults to |
Bootstrap estimates of a lineup proportion are counts divided by the
number of lineup choices, so they fall on a discrete lattice with spacing
1/n rather than on a continuum. Binning such values at an arbitrary
resolution produces a misleading histogram: bins that contain no attainable
value are empty regardless of the data, and bins that happen to straddle two
attainable values are twice as tall as their neighbours. When neither
bins nor binwidth is supplied, the lattice spacing is
recovered (from the "n" attribute when present, otherwise from the
values themselves) and used as the bin width, so each bar covers exactly one
attainable proportion. Estimates that are effectively continuous fall back
to 30 bins.
A ggplot object.
vec <- round(runif(200, 1, 6))
dist <- lineup_bias_boot_dist(vec, target_pos = 3, k = 6, R = 500)
plot_lineup_bias_distribution(dist, target_pos = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.