Learn R Programming

dampack (version 1.0.0)

dirichlet_params: Calculate alpha parameters of Dirichlet distribution.

Description

Function to calculate the \(\alpha\) parameters of the Dirichlet distribution based on the method of moments (MoM) using the mean \(\mu\) and standard deviation \(\sigma\) of the random variables of interest.

Usage

dirichlet_params(p.mean, sigma)

Arguments

p.mean

Vector of means of the random variables.

sigma

Vector of standard deviation of the random variables (i.e., standard error).

Value

numeric vector of method-of-moment estimates for the alpha parameters of the dirichlet distribution

Details

Based on methods of moments. If \(\mu\) is a vector of means and \(\sigma\) is a vector of standard deviations of the random variables, then the second moment \(X_2\) is defined by \(\sigma^2 + \mu^2\). Using the mean and the second moment, the \(J\) alpha parameters are computed as follows $$\alpha_i = \frac{(\mu_1-X_{2_{1}})\mu_i}{X_{2_{1}}-\mu_1^2}$$ for \(i = 1, \ldots, J-1\), and $$\alpha_J = \frac{(\mu_1-X_{2_{1}})(1-\sum_{i=1}^{J-1}{\mu_i})}{X_{2_{1}}-\mu_1^2}$$

References

  1. Fielitz BD, Myers BL. Estimation of parameters in the beta distribution. Dec Sci. 1975;6(1):1<U+2013>13.

  2. Narayanan A. A note on parameter estimation in the multivariate beta distribution. Comput Math with Appl. 1992;24(10):11<U+2013>7.

Examples

Run this code
# NOT RUN {
p.mean <- c(0.5, 0.15, 0.35)
p.se   <- c(0.035, 0.025, 0.034)
dirichlet_params(p.mean, p.se)
# }

Run the code above in your browser using DataLab