rDirichlet: Dirichlet distribution

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

The Dirichlet distribution on the simplex.

Usage

1
2
3
4

Arguments

n

number of datasets to be simulated

alpha

parameters of the Dirichlet distribution

Details

The Dirichlet distribution is the result of closing a vector of equally-scaled Gamma-distributed variables. It the conjugate prior distribution for a vector of probabilities of a multinomial distribution. Thus, it generalizes the beta distribution for more than two parts.

Value

a generated random dataset of class "acomp" or "rcomp", drawn from a Dirichlet distribution with the given parameter alpha. The names of alpha are used to name the parts.

Author(s)

K.Gerald v.d. Boogaart http://www.stat.boogaart.de, Raimon Tolosana-Delgado

References

Aitchison, J. (1986) The Statistical Analysis of Compositional Data Monographs on Statistics and Applied Probability. Chapman & Hall Ltd., London (UK). 416p.

Mateu-Figueras, G.; Pawlowsky-Glahn, V. (2005). The Dirichlet distribution with respect to the Aitchison measure on the simplex, a first approach. In: Mateu-Figueras, G. and Barcel\'o-Vidal, C. (Eds.) Proceedings of the 2nd International Workshop on Compositional Data Analysis, Universitat de Girona, ISBN 84-8458-222-1, http://ima.udg.es/Activitats/CoDaWork05

See Also

rnorm.acomp

Examples

1
2
tmp <- rDirichlet.acomp(10,alpha=c(A=2,B=0.2,C=0.2))
plot(tmp)

Example output

Loading required package: tensorA

Attaching package: 'tensorA'

The following object is masked from 'package:base':

    norm

Loading required package: robustbase
Loading required package: energy
Loading required package: bayesm
Welcome to compositions, a package for compositional data analysis.
Find an intro with "? compositions"


Attaching package: 'compositions'

The following objects are masked from 'package:stats':

    cor, cov, dist, var

The following objects are masked from 'package:base':

    %*%, scale, scale.default

Warning message:
In structure(c(), class = c(class(x), class(y))) :
  Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
  Consider 'structure(list(), *)' instead.
Warning messages:
1: In structure(c(), class = c(class(x), class(y))) :
  Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
  Consider 'structure(list(), *)' instead.
2: In structure(c(), class = c(class(x), class(y))) :
  Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
  Consider 'structure(list(), *)' instead.
3: In structure(c(), class = c(class(x), class(y))) :
  Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
  Consider 'structure(list(), *)' instead.
4: In structure(c(), class = c(class(x), class(y))) :
  Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
  Consider 'structure(list(), *)' instead.
5: In structure(c(), class = c(class(x), class(y))) :
  Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
  Consider 'structure(list(), *)' instead.
6: In structure(c(), class = c(class(x), class(y))) :
  Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
  Consider 'structure(list(), *)' instead.

compositions documentation built on May 30, 2017, 3:25 a.m.