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

Author

John Giles

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] 1.59125336 13.35693311 0.02174418 3.52083188 6.41864717 #> #> $shape2 #> [1] 0.2944077 4.9462227 0.5442898 7.0261602 2.1478568 #>