dirmultinomial(lphi="logit", ephi = list(), iphi = 0.10,
parallel= FALSE, zero="M")
Links
for more choices.lphi
.
See earg
in Links
for general information.parallel=TRUE
"M"
then this means the numerical value
$M$, which corresponds to"vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
rrvglm
and vgam
. If the model is an intercept-only model then @misc
(which is a
list) has a component called shape
which is a vector with the
$M$ values $\pi_j(1/\phi-1)$.
choose
).
The above formula applies to each row of the matrix response.
In this lphi
applied to $\phi$.Note that $E(Y_j) = N_* \pi_j$ but the probabilities (returned as the fitted values) $\pi_j$ are bundled together as a $M$-column matrix. The quantities $N_*$ are returned as the prior weights.
The beta-binomial distribution is a special case of
the Dirichlet-multinomial distribution when $M=2$;
see betabinomial
. It is easy to show that
the first shape parameter of the beta distribution is
$shape1=\pi(1/\phi-1)$ and the second shape
parameter is $shape2=(1-\pi)(1/\phi-1)$.
Also, $\phi=1/(1+shape1+shape2)$, which
is known as the intra-cluster correlation coefficient.
dirmul.old
,
betabinomial
,
betabin.ab
,
dirichlet
,
multinomial
.n = 10
M = 5
y = round(matrix(runif(n*M)*10, n, M)) # Integer counts
fit = vglm(y ~ 1, dirmultinomial, trace=TRUE)
head(fitted(fit))
fit@y # Sample proportions
weights(fit, type="prior", matrix=FALSE) # Total counts per row
x = runif(n)
fit = vglm(y ~ x, dirmultinomial, trace=TRUE)
Coef(fit) # This does not work
coef(fit, matrix=TRUE)
(sfit = summary(fit))
vcov(sfit)
Run the code above in your browser using DataLab