Learn R Programming

bayesics (version 2.0.2)

find_beta_parms: Find parameters for Beta prior based on prior mean and one quantile

Description

Find parameters for Beta prior based on prior mean and one quantile

Usage

find_beta_parms(
  mean,
  quantile,
  left_tail_prob,
  plot_results = TRUE,
  search_bounds = c(0.001, 100)
)

Value

Vector of beta shape parameters

Arguments

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.

Examples

Run this code
find_beta_parms(2/5,0.68,0.9)
2/ (2 + 3)
qbeta(0.9,2,3)


Run the code above in your browser using DataLab