ws3 | R Documentation |
This generic synthetic long-format data set has a polytomous response Y
and two factors X1
and X2
. The response has categories
{yes, no, maybe}
. Factor X1
has levels {a, b}
, and factor
X2
has levels {c, d}
. It also has a PId
column for a
participant identifier. Participant identifiers are repeated across rows.
A data frame with 60 observations on the following 4 variables:
a participant identifier with levels "1"
... "15"
a within-subjects factor with levels "a"
, "b"
a within-subjects factor with levels "c"
, "d"
a polytomous response with categories "yes"
, "no"
, "maybe"
See glmer.mp
and glmer.mp.con
for complete examples.
library(multpois)
data(ws3, package="multpois")
ws3$PId = factor(ws3$PId)
ws3$Y = factor(ws3$Y, levels=c("yes","no","maybe"))
ws3$X1 = factor(ws3$X1)
ws3$X2 = factor(ws3$X2)
contrasts(ws3$X1) <- "contr.sum"
contrasts(ws3$X2) <- "contr.sum"
m = glmer.mp(Y ~ X1*X2 + (1|PId), data=ws3)
Anova.mp(m, type=3)
glmer.mp.con(m, pairwise ~ X1*X2, adjust="holm")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.