bs3: Between-subjects 2×2 design with polytomous response data

bs3R Documentation

Between-subjects 2×2 design with polytomous response data

Description

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. Each participant appears on only one row.

Format

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

PId

a participant identifier with levels "1" ... "60"

X1

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

X2

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

Y

a polytomous response with categories "yes", "no", "maybe"

See Also

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

Examples

library(multpois)
data(bs3, package="multpois")

bs3$PId = factor(bs3$PId)
bs3$Y = factor(bs3$Y, levels=c("yes","no","maybe"))
bs3$X1 = factor(bs3$X1)
bs3$X2 = factor(bs3$X2)
contrasts(bs3$X1) <- "contr.sum"
contrasts(bs3$X2) <- "contr.sum"

m = glm.mp(Y ~ X1*X2, data=bs3)
Anova.mp(m, type=3)
glm.mp.con(m, pairwise ~ X1*X2, adjust="holm")


multpois documentation built on April 3, 2025, 9:37 p.m.