dirichlet_params: Calculate alpha parameters of Dirichlet distribution.

Description Usage Arguments Value Details References Examples

Description

Function to calculate the α parameters of the Dirichlet distribution based on the method of moments (MoM) using the mean μ and standard deviation σ of the random variables of interest.

Usage

1

Arguments

p.mean

Vector of means of the random variables.

sigma

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

Value

alpha Alpha parameters of dirichlet distribution

Details

Based on methods of moments. If μ is a vector of means and σ is a vector of standard deviations of the random variables, then the second moment X_2 is defined by σ^2 + μ^2. Using the mean and the second moment, the J alpha parameters are computed as follows

α_i = \frac{(μ_1-X_{2_{1}})μ_i}{X_{2_{1}}-μ_1^2}

for i = 1, …, J-1, and

α_J = \frac{(μ_1-X_{2_{1}})(1-∑_{i=1}^{J-1}{μ_i})}{X_{2_{1}}-μ_1^2}

References

  1. Fielitz BD, Myers BL. Estimation of parameters in the beta distribution. Dec Sci. 1975;6(1):1–13.

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

Examples

1
2
3
4
5
6
7
## 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)
# True values: 100, 30, 70

## End(Not run)

feralaes/dampack documentation built on May 16, 2019, 12:48 p.m.