fit_dirichlet: Estimate Parameters of Dirichlet Distribution

Description Usage Arguments Details References See Also Examples

Description

C++ implementation of the fixed-point iteration algorithm by Minka (2000).

Usage

1
fit_dirichlet(x, const, maxit = 1e+05, abstol = 0.1)

Arguments

x

a matrix of Dirichlet samples, one row per observation.

const

constant that is added to avoid problems with zeros in log(x). The default is const = min(x[x>0])*.01.

maxit

maximum number of iterations.

abstol

The absolute convergence tolerance: maximum of absolute differences of Dirichlet parameters.

Details

The algorithm is used to estimate the effective sample size based on samples of posterior model probabilities (see stationary and summary.stationary).

References

Minka, T. (2000). Estimating a Dirichlet distribution. Technical Report.

See Also

rdirichlet

Examples

1
2
x <- rdirichlet(100, c(8,1,3,9))
fit_dirichlet(x)

MCMCprecision documentation built on Dec. 5, 2019, 9:08 a.m.