Generating random numbers on a simplex

Algorithms for three types of random compositional vectors are provided in this article. The first is intuitive. Random basis (“open”) vectors are transformed into compositional vectors by dividing each vector's components by the sum of its components. The second algorithm uses a coordinate transformation to map uniform random vectors in a d-dimensional hypertetrahedron into uniformly distributed compositional variables on the d + 1 dimensional simplex. The third algorithm operates upon a logratio population covariance matrix and vector of means to produce random compositional vectors drawn from the same distribution. The statistical attributes of the crude compositional data also are honored by this method.