Anova.mp | R Documentation |
Get ANOVA-style results for a model returned by glm.mp
or glmer.mp
.
The output table contains chi-square results for the main effects and interactions indicated by
the given model.
Anova.mp(model, type = c(3, 2, 1, "III", "II", "I"))
model |
A model built by |
type |
In the case of a Type II or Type III ANOVA, this value will be the |
For Type II or III ANOVAs, the Anova.mp
function uses Anova
behind the scenes to
produce an ANOVA-style table with chi-square results. For Type I ANOVAs, it uses
anova.glm
or anova.merMod
, depending on the model.
Users wishing to verify the correctness of these results can compare Anova
results
for dichotomous response models built with glm
or glmer
(using
family=binomial
) to Anova.mp
results for models built with glm.mp
or
glmer.mp
, respectively. The results should be similar.
Users can also compare Anova
results for polytomous response models built with
multinom
to Anova.mp
results for models built with glm.mp
.
Again, the results should be similar.
To date, there is no similarly easy comparison for polytomous response models with repeated measures.
This lack of options was a key motivation for developing glmer.mp
in the first place.
An ANOVA-style table of chi-square results for models built by glm.mp
or
glmer.mp
. See the return values for Anova
, anova.glm
,
or anova.merMod
.
Jacob O. Wobbrock
Baker, S.G. (1994). The multinomial-Poisson transformation. The Statistician 43 (4), pp. 495-504. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2307/2348134")}
Chen, Z. and Kuo, L. (2001). A note on the estimation of the multinomial logit model with random effects. The American Statistician 55 (2), pp. 89-95. https://www.jstor.org/stable/2685993
Guimaraes, P. (2004). Understanding the multinomial-Poisson transformation. The Stata Journal 4 (3), pp. 265-273. https://www.stata-journal.com/article.html?article=st0069
Lee, J.Y.L., Green, P.J.,and Ryan, L.M. (2017). On the “Poisson trick” and its extensions for fitting multinomial regression models. arXiv preprint available at \Sexpr[results=rd]{tools:::Rd_expr_doi("10.48550/arXiv.1707.08538")}
glm.mp()
, glm.mp.con()
, glmer.mp()
, glmer.mp.con()
, car::Anova()
, stats::anova.glm()
, lme4::anova.merMod()
library(multpois)
## two between-subjects factors (X1,X2) with polytomous response (Y)
data(bs3, package="multpois")
bs3$PId = factor(bs3$PId)
bs3$Y = factor(bs3$Y)
bs3$X1 = factor(bs3$X1)
bs3$X2 = factor(bs3$X2)
contrasts(bs3$X1) <- "contr.sum"
contrasts(bs3$X2) <- "contr.sum"
m1 = glm.mp(Y ~ X1*X2, data=bs3)
Anova.mp(m1, type=3)
## two within-subjects factors (X1,X2) with polytomous response (Y)
data(ws3, package="multpois")
ws3$PId = factor(ws3$PId)
ws3$Y = factor(ws3$Y)
ws3$X1 = factor(ws3$X1)
ws3$X2 = factor(ws3$X2)
contrasts(ws3$X1) <- "contr.sum"
contrasts(ws3$X2) <- "contr.sum"
m2 = glmer.mp(Y ~ X1*X2 + (1|PId), data=ws3)
Anova.mp(m2, type=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.