This function finds the two shape parameters for the Beta distribution of a random variable between 0 and 1.

get_beta_params(mu, sigma)

Arguments

mu

scalar or vector giving the mean of the proportion

sigma

scalar or vector giving the standard deviation of the proportion

Value

A list containing the two shape parameters of the Beta distribution

See also

Examples

get_beta_params(0.6, 0.03)
#> $shape1 #> [1] 4.2 #> #> $shape2 #> [1] 2.8 #>
n <- 5 get_beta_params(mu=runif(n, 0, 1), sigma=runif(n, 0, 0.05))
#> $shape1 #> [1] 19.51621697 0.04537517 0.29124849 -0.82592187 0.36789118 #> #> $shape2 #> [1] 19.684547428 2.278547257 3.049377364 -0.003348041 0.022596671 #>