View source: R/draw_beta_mixture_nsamples.R
| draw_beta_mixture_nsamples | R Documentation | 
Draws samples from a mixture of beta distributions, representing pooled weights on the informative component of a robust MAP prior, as elicited from experts via the roulette method.
draw_beta_mixture_nsamples(n, chips_mult, expert_weight = NULL)
| n | Numeric value, the number of samples to be drawn. | 
| chips_mult | Numeric matrix, containing expert weighting (distributions of chips). Rows should represent experts, columns should represent bins / weight intervals. | 
| expert_weight | An optional numeric vector, containing the weight assigned to each expert (defaults to equal weights). | 
A numeric vector containing samples from a pooled distribution of expert opinions.
fit_beta_mult_exp and get_summary_mult_exp.
rweights <- draw_beta_mixture_nsamples(
  n = 50,
  chips_mult = rbind(
    c(0, 0, 0, 0, 2, 3, 3, 2, 0, 0),
    c(0, 0, 0, 1, 2, 4, 2, 1, 0, 0),
    c(0, 0, 0, 2, 2, 2, 2, 2, 0, 0)
  ),
  expert_weight = rep(1/3, 3)
)
print(rweights)
## Not run: 
hist(rweights)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.