asa266
asa266,
a FORTRAN90 code which
estimates the parameters of a Dirichlet probability density function (PDF).
The code is Applied Statistics Algorithm 266.
The assumption is that a given process is governed by a Dirichlet
distribution with parameters ALPHA(I), I = 1 to N, positive quantities
which are required to sum to 1. Each observation of the process yields
a vector of N data values. After a number of observations of this sort,
it is desired to estimate the the underlying parameters ALPHA of
the Dirichlet distribution.
There are a considerable number of routines required to get DIRICH
to work. In some cases, there are several versions of the routines,
and they all were included, in order to provide a way to check
results.
Also included is a routine DIRICHLET_SAMPLE, with which experiments
can be carried out. Values for the parameters ALPHA can be chosen,
and data generated by DIRICHLET_SAMPLE. Then DIRICH can analyze this
data and attempt to determine the values of ALPHA.
Another routine, DIRICHLET_MIX_SAMPLE, allows you to sample a
probability distribution that is a weighted mixture of Dirichlet
distributions.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
asa266 is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
ASA032,
a FORTRAN90 code which
evaluates the incomplete Gamma integral.
ASA066,
a FORTRAN90 code which
evaluates the percentage points of the normal distribution.
ASA091,
a FORTRAN90 code which
evaluates the percentage points of the ChiSquared distribution.
ASA103,
a FORTRAN90 code which
evaluates the digamma or psi function.
ASA111,
a FORTRAN90 code which
evaluates the percentage points of the normal distribution.
ASA121,
a FORTRAN90 code which
evaluates the trigamma function.
ASA147,
a FORTRAN90 code which
evaluates the incomplete Gamma function.
ASA239,
a FORTRAN90 code which
evaluates the percentage points of the ChiSquared distribution
and the incomplete Gamma function.
ASA241,
a FORTRAN90 code which
evaluates the percentage points of the normal distribution.
ASA245,
a FORTRAN90 code which
evaluates the logarithm of the Gamma function.
asa266_test
BDMLIB,
a FORTRAN90 code which
estimates the weights in a Dirichlet mixtured based on sample data;
CDFLIB,
a FORTRAN90 code which
evaluates and inverts
a number of statistical distributions.
GETWGT,
a FORTRAN90 code which
estimates the parameters of a Dirichlet mixture.
NORMAL,
a FORTRAN90 code which
samples the normal distribution.
PROB,
a FORTRAN90 code which
evaluates the PDF, CDF, mean and variance for a number of probability
density functions.
TEST_VALUES,
a FORTRAN90 code which
contains sample values
for a number of distributions.
TOMS291,
a FORTRAN90 code which
evaluates the logarithm of the Gamma function.
UNIFORM,
a FORTRAN90 code which
samples the uniform distribution.
Reference:

AG Adams,
Algorithm 39:
Areas Under the Normal Curve,
Computer Journal,
Volume 12, Number 2, May 1969, pages 197198.

Joachim Ahrens, Ulrich Dieter,
Computer Methods for Sampling from Gamma, Beta, Poisson and
Binomial Distributions,
Computing,
Volume 12, Number 3, September 1974, pages 223246.

Joachim Ahrens, Ulrich Dieter,
Generating Gamma Variates by a Modified Rejection Technique,
Communications of the ACM,
Volume 25, Number 1, January 1982, pages 4754.

Jerry Banks, editor,
Handbook of Simulation,
Wiley, 1998,
ISBN: 0471134031,
LC: T57.62.H37.

JD Beasley, SG Springer,
Algorithm AS 111:
The Percentage Points of the Normal Distribution,
Applied Statistics,
Volume 26, Number 1, 1977, pages 118121.

Jose Bernardo,
Algorithm AS 103:
Psi ( Digamma ) Function,
Applied Statistics,
Volume 25, Number 3, 1976, pages 315317.

Donald Best, DE Roberts,
Algorithm AS 91:
The Percentage Points of the ChiSquared Distribution,
Applied Statistics,
Volume 24, Number 3, 1975, pages 385390.

G Bhattacharjee,
Algorithm AS 32:
The Incomplete Gamma Integral,
Applied Statistics,
Volume 19, Number 3, 1970, pages 285287.

William Cody, Kenneth Hillstrom,
Chebyshev Approximations for the Natural Logarithm of the
Gamma Function,
Mathematics of Computation,
Volume 21, Number 98, April 1967, pages 198203.

William Cody, Anthony Strecok, Henry Thacher,
Chebyshev Approximations for the Psi Function,
Mathematics of Computation,
Volume 27, Number 121, January 1973, pages 123127.

John Hart, Ward Cheney, Charles Lawson, Hans Maehly,
Charles Mesztenyi, John Rice, Henry Thacher,
Christoph Witzgall,
Computer Approximations,
Wiley, 1968,
LC: QA297.C64.

David Hill,
Algorithm AS 66:
The Normal Integral,
Applied Statistics,
Volume 22, Number 3, 1973, pages 424427.

Cornelius Lanczos,
A precision approximation of the gamma function,
SIAM Journal on Numerical Analysis, B,
Volume 1, 1964, pages 8696.

Chi Leung Lau,
Algorithm AS 147:
A Simple Series for the Incomplete Gamma Integral,
Applied Statistics,
Volume 29, Number 1, 1980, pages 113114.

Allan Mcleod,
Algorithm AS 245:
A Robust and Reliable Algorithm for the Logarithm
of the Gamma Function,
Applied Statistics,
Volume 38, Number 2, 1989, pages 397402.

A. Naryanan,
Algorithm AS 266:
Maximum Likelihood Estimation of the Parameters of the
Dirichlet Distribution,
Applied Statistics,
Volume 40, Number 2, 1991, pages 365374.

Malcolm Pike, David Hill,
Algorithm 291:
Logarithm of Gamma Function,
Communications of the ACM,
Volume 9, Number 9, September 1966, page 684.

BE Schneider,
Algorithm AS 121:
Trigamma Function,
Applied Statistics,
Volume 27, Number 1, 1978, pages 9799.

BL Shea,
Algorithm AS 239:
Chisquared and Incomplete Gamma Integral,
Applied Statistics,
Volume 37, Number 3, 1988, pages 466473.

Michael Wichura,
Algorithm AS 241:
The Percentage Points of the Normal Distribution,
Applied Statistics,
Volume 37, Number 3, 1988, pages 477484.
Source Code:
Last revised on 22 May 2020.