fitdirichlet | R Documentation |
Fits a Dirichtlet Distribution to a dataset by maximum likelihood.
fitDirichlet(x,elog=mean(ult(x)),alpha0=rep(1,length(elog)),maxIter=20,n=nrow(x))
x |
a dataset of compositions (acomp) |
elog |
the expected log can provided instead of the dataset itself. |
alpha0 |
the start value for alpha parameter in the iteration |
maxIter |
The maximum number of iterations in the Fischer scoring method. |
n |
the number of datapoints used to estimate elog |
The fitting is done using a modified version of the Fisher-Scoring method using analytiscal expressions for log mean and log variance. The modification is introducted to prevent the algorithm from leaving the admissible parameter set. It reduced the stepsize to at most have of distance to the limit of the admissible parameter set.
alpha |
the estimated parameter |
loglikelihood |
the likelihood |
df |
The dimension of the dataset minus the dimension of the parameter |
Up to now the fitting can not handle missings.
K.Gerald v.d. Boogaart http://www.stat.boogaart.de
Aitchison, J. (1986) The Statistical Analysis of Compositional
Data Monographs on Statistics and Applied Probability. Chapman &
Hall Ltd., London (UK). 416p.
rDirichlet
, acompDirichletGOF.test
,
runif.acomp
, rnorm.acomp
,
x <- rDirichlet.acomp(100,c(1,2,3,4))
fitDirichlet(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.