Anova.mp {multpois}R Documentation

Get ANOVA-style results for a multinomial-Poisson model

Description

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.

Usage

Anova.mp(model, type = c(3, 2, 1, "III", "II", "I"))

Arguments

model

A model built by glm.mp or glmer.mp. (The underlying model will have been built by glm or glmer, with family=poisson.)

type

In the case of a type II or type III ANOVA, this value will be the type parameter passed to Anova. In the case of a type I ANOVA, for models built with glm.mp, the anova.glm function will be called; for models built with glmer.mp, the anova.merMod function will be called. The default is type 3. See the Details section for Anova.

Details

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.

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 generally match, or be very 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 generally match, or be very similar.

There is no similarly easy comparison for polytomous response models with repeated measures. The lack of options was a key motivation for developing glmer.mp in the first place.

Value

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.

Author(s)

Jacob O. Wobbrock

References

Baker, S.G. (1994). The multinomial-Poisson transformation. The Statistician 43 (4), pp. 495-504. 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 doi:10.48550/arXiv.1707.08538

See Also

glm.mp(), glm.mp.con(), glmer.mp(), glmer.mp.con(), car::Anova()

Examples

## 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)

## 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)


[Package multpois version 0.2.0 Index]