dirichlet(link = "loge", parallel = FALSE, zero = NULL)
Links
for more choices.
The default gives $\eta_j=\log(\alpha_j)$.CommonVGAMffArguments
for more 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 is commonly used to model compositional
data, including applications in genetics.
Suppose $(Y_1,\ldots,Y_{M})^T$ is
the response. Then it has a Dirichlet distribution if
$(Y_1,\ldots,Y_{M-1})^T$ has density
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)$.
Forbes, C., Evans, M., Hastings, N. and Peacock, B. (2011) Statistical Distributions, Hoboken, NJ, USA: John Wiley and Sons, Fourth edition.
rdiric
,
dirmultinomial
,
multinomial
,
simplex
.ydata <- data.frame(rdiric(n = 1000,
shape = exp(c(y1 = -1, y2 = 1, y3 = 0))))
fit <- vglm(cbind(y1, y2, y3) ~ 1, dirichlet,
data = ydata, trace = TRUE, crit = "coef")
Coef(fit)
coef(fit, matrix = TRUE)
head(fitted(fit))
Run the code above in your browser using DataLab