View source: R/elicitation_roulette.R
| elicit_roulette | R Documentation |
Implements the SHELF roulette method: the expert allocates a fixed number of "chips" across a set of pre-defined bins representing the range of the quantity. The resulting histogram is fitted to a parametric distribution.
elicit_roulette(
chips,
breaks,
family = c("beta", "normal", "gamma", "lognormal"),
expert_id = "Expert_1",
label = "Unknown quantity"
)
chips |
Integer vector. Number of chips in each bin (left-to-right). |
breaks |
Numeric vector of length |
family |
Character. Distribution to fit. One of |
expert_id |
Character. Expert identifier. |
label |
Character. Quantity description. |
In the Shiny app (Prior elicitation tab) the roulette grid is rendered
interactively. This function provides the fitting back-end that can
also be called programmatically when chips are known.
Chips are converted to relative frequencies, and bin midpoints are used as
representative values. The chosen family is then fitted by minimising the
weighted sum of squared CDF differences (a histogram-matching approach).
A bayprior object fitted to the chip histogram.
Oakley, J. E. & O'Hagan, A. (2010). SHELF: the Sheffield Elicitation Framework. University of Sheffield.
# Expert places 0, 2, 5, 8, 5, 2, 1 chips across bins [0,.1,.2,...,.7]
prior <- elicit_roulette(
chips = c(0L, 2L, 5L, 8L, 5L, 2L, 1L),
breaks = seq(0, 0.7, by = 0.1),
family = "beta",
label = "Response rate"
)
print(prior)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.