ws2 {multpois}R Documentation

Within-subjects 2×2 design with dichotomous response

Description

This generic synthetic dataset has a dichotomous response Y and two factors X1 and X2. The response has categories {yes,no}. Factor X1 has levels {a,b}, and factor X2 has levels {c,d}. It also has a PId column for participant identifier. Participant identifiers are repeated across rows.

Format

A data frame with 60 observations on the following 4 variables:

PId

a subject identifier with levels "1" ... "10"

X1

a within-subjects factor with levels "a", "b"

X2

a within-subjects factor with levels "c", "d"

Y

a dichotomous response with categories "yes", "no"

See Also

See glmer.mp and glmer.mp.con for complete examples.

Examples

data(ws2, package="multpois")

ws2$PId = factor(ws2$PId)
ws2$Y = factor(ws2$Y)
ws2$X1 = factor(ws2$X1)
ws2$X2 = factor(ws2$X2)
contrasts(ws2$X1) <- "contr.sum"
contrasts(ws2$X2) <- "contr.sum"

m = glmer.mp(Y ~ X1*X2 + (1|PId), data=ws2)
Anova.mp(m, type=3)
glmer.mp.con(m, pairwise ~ X1*X2, adjust="holm")


[Package multpois version 0.2.0 Index]