Description Usage Arguments Value Examples
Fit Dirichlet parameters
1 2 3 | fit.dirichlet(X, type = "mm")
fit.genDirichlet(X, type = "mm")
|
X |
samples from a dirichlet distribution |
type |
|
A list giving the k value or vector of k values for the Generalized
Dirichlet and vector of p estimates. The normal Dirichlet parameterization can be obtained by k*p.
The fit.dirichlet function returns two estimates of k. One based on the most likely
parameter in the distribution, the other based on a weighted mean of the k estimates for each parameter.
1 2 3 4 5 6 | fit.dirichlet(matrix(c(.1, .9, .2, .8, .3, .7), nrow=3, ncol=2, byrow=TRUE), type="mm")
Z <- rdirichlet(100, c(4,3,2))
fit.dirichlet(Z)
fit.dirichlet(Z, "ml")
Z2 <- rGenDirichlet(100, c(0.7, 0.2, 0.1), c(10, 20, 20))
fit.genDirichlet(Z2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.