View source: R/find_beta_parms.R
| find_beta_parms | R Documentation |
Find parameters for Beta prior based on prior mean and one quantile
find_beta_parms(
mean,
quantile,
left_tail_prob,
plot_results = TRUE,
search_bounds = c(0.001, 100)
)
mean |
numeric between 0 and 1 giving the prior mean |
quantile |
numeric between 0 and 1 giving the quantile lying at left_tail_prob |
left_tail_prob |
numeric between 0 and 1 giving the prior probability of theta being less than or equal to quantile |
plot_results |
logical. Should the resulting inverse gamma distribution be plotted? |
search_bounds |
bounds with which to search. Sometimes you need to adjust this to get a good solution. |
Vector of beta shape parameters
find_beta_parms(2/5,0.68,0.9)
2/ (2 + 3)
qbeta(0.9,2,3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.