dirichlet(link = "loge", earg=list(), zero=NULL)
Links
for more choices.
The default gives $\eta_j=\log(\alpha_j)$.earg
in Links
for general information."vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
rrvglm
and vgam
. When fitted, the fitted.values
slot of the object contains the
$M$-column matrix of means.
The Dirichlet distribution can be motivated by considering the random variables $(G_1,\ldots,G_{M})^T$ which are each independent and identically distributed as a gamma distribution with density $f(g_j)=g_j^{\alpha_j - 1} e^{-g_j} / \Gamma(\alpha_j)$. Then the Dirichlet distribution arises when $Y_j=G_j / (G_1 + \cdots + G_M)$.
Evans, M., Hastings, N. and Peacock, B. (2000) Statistical Distributions, New York: Wiley-Interscience, Third edition.
rdiric
,
dirmultinomial
,
multinomial
.y = rdiric(n=1000, shape=exp(c(-1,1,0)))
fit = vglm(y ~ 1, dirichlet, trace = TRUE, crit="c")
Coef(fit)
coef(fit, matrix=TRUE)
fitted(fit)[1:2,]
Run the code above in your browser using DataLab