| fit_dirichlet {MCMCprecision} | R Documentation |
C++ implementation of the fixed-point iteration algorithm by Minka (2000).
fit_dirichlet(x, const, maxit = 1e+05, abstol = 0.1)
x |
a matrix of Dirichlet samples, one row per observation. |
const |
constant that is added to avoid problems with zeros in |
maxit |
maximum number of iterations. |
abstol |
The absolute convergence tolerance: maximum of absolute differences of Dirichlet parameters. |
The algorithm is used to estimate the effective sample size based on samples
of posterior model probabilities (see stationary and
summary.stationary).
Minka, T. (2000). Estimating a Dirichlet distribution. Technical Report.
x <- rdirichlet(100, c(8,1,3,9)) fit_dirichlet(x)