mom_beta: Method of moments for beta distribution

View source: R/distributions.R

mom_betaR Documentation

Method of moments for beta distribution

Description

Compute the parameters shape1 and shape2 of the beta distribution using method of moments given the mean and standard deviation of the random variable of interest.

Usage

mom_beta(mean, sd)

Arguments

mean

Mean of the random variable.

sd

Standard deviation of the random variable.

Details

If \mu is the mean and \sigma is the standard deviation of the random variable, then the method of moments estimates of the parameters shape1 = \alpha > 0 and shape2 = \beta > 0 are:

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

and

\beta = (1 - \mu) \left(\frac{\mu(1-\mu)}{\sigma^2}-1 \right)

Value

A list containing the parameters shape1 and shape2.

Examples

mom_beta(mean = .8, sd = .1)
# The function is vectorized.
mom_beta(mean = c(.6, .8), sd = c(.08, .1))


InnovationValueInitiative/hesim documentation built on Feb. 12, 2024, 10:39 p.m.