beta_params: Calculate alpha and beta parameters of Beta distribution.

View source: R/beta_params.R

beta_paramsR Documentation

Calculate alpha and beta parameters of Beta distribution.

Description

Function to calculate the alpha and beta parameters of the Beta distribution based on the method of moments using the mean \mu and standard deviation \sigma of the random variable of interest.

Usage

beta_params(mean, sigma)

Arguments

mean

Mean of the random variable.

sigma

Standard deviation of the random variable (i.e., standar error).

Value

alpha Alpha parameter of beta distribution

beta Beta parameter of beta distribution

Details

Based on methods of moments. If \mu is the mean and \sigma is the standard deviation of the random variable, then

\alpha = (\frac{1-\mu}{\sigma^2} - \frac{1}{\mu}) \mu^2

and

\beta = \alpha (\frac{1}{\mu} -1)


feralaes/dampack documentation built on Sept. 8, 2024, 11:31 a.m.