Description Usage Arguments Details Value Missing Policy Author(s) References See Also Examples

Fits a Dirichtlet Distribution to a dataset by maximum likelihood.

1 |

`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`

,

1 2 | ```
x <- rDirichlet.acomp(100,c(1,2,3,4))
fitDirichlet(x)
``` |

```
Loading required package: tensorA
Attaching package: 'tensorA'
The following object is masked from 'package:base':
norm
Loading required package: robustbase
Loading required package: energy
Loading required package: bayesm
Welcome to compositions, a package for compositional data analysis.
Find an intro with "? compositions"
Attaching package: 'compositions'
The following objects are masked from 'package:stats':
cor, cov, dist, var
The following objects are masked from 'package:base':
%*%, scale, scale.default
Warning message:
In structure(c(), class = c(class(x), class(y))) :
Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
Consider 'structure(list(), *)' instead.
$alpha
[1] 0.9252514 2.1381038 2.8845571 3.9291478
$loglikelihood
[1] -1737.571
$df
[1] 296
Warning message:
In structure(c(), class = c(class(x), class(y))) :
Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.
Consider 'structure(list(), *)' instead.
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.