icecream {multpois} | R Documentation |
Mixed factorial 2×2 design with polytomous response
Description
This synthetic dataset represents a survey of 40 respondents about their favorite ice cream flavor. Twenty of the respondents were adults and 20 were children. They were queried four times over the course of a year, once in the middle of each season (fall, winter, spring, summer).
This dataset has a polytomous response Pref
and two factors,
Age
and Season
. The response has the unordered categories
{vanilla, chocolate, strawberry, other}
. Factor Age
has levels
{adult, child}
, and factor Season
has levels {fall, winter, spring, summer}
.
It also has a PId
column for participant identifier. Each participant identifier is repeated
four times, once per season.
Format
A data frame with 160 observations on the following 4 variables:
- PId
a subject identifier with levels
"1"
..."40"
- Age
a between-subjects factor with levels
"adult"
,"child"
- Season
a within-subjects factor with levels
"fall"
,"winter"
,"spring"
,"summer"
- Pref
a polytomous response with categories
"vanilla"
,"chocolate"
,"strawberry"
,"other"
See Also
See vignette("multpois", package="multpois")
for a complete analysis of this data set.
Examples
data(icecream, package="multpois")
icecream$PId = factor(icecream$PId)
icecream$Pref = factor(icecream$Pref)
icecream$Age = factor(icecream$Age)
icecream$Season = factor(icecream$Season)
contrasts(icecream$Age) <- "contr.sum"
contrasts(icecream$Season) <- "contr.sum"
m = glmer.mp(Pref ~ Age*Season + (1|PId), data=icecream)
Anova.mp(m, type=3)
glmer.mp.con(m, pairwise ~ Age*Season, adjust="holm")