| VerbAgg | R Documentation |
These are the item responses to a questionaire on verbal aggression. These data are used throughout De Boeck and Wilson, Explanatory Item Response Models (Springer, 2004) to illustrate various forms of item response models.
A data frame with 7584 observations on the following 13 variables.
Angerthe subject's Trait Anger score as measured on the State-Trait Anger Expression Inventory (STAXI)
Genderthe subject's gender - a factor with levels
M and F
itemthe item on the questionaire, as a factor
respthe subject's response to the item - an ordered
factor with levels no < perhaps < yes
idthe subject identifier, as a factor
btypebehavior type - a factor with levels
curse, scold and shout
situsituation type - a factor with levels
other and self indicating other-to-blame and self-to-blame
modebehavior mode - a factor with levels want
and do
r2dichotomous version of the response - a factor with
levels N and Y
http://bear.soe.berkeley.edu/EIRM/
De Boeck and Wilson (2004), Explanatory Item Response Models, Springer.
str(VerbAgg)
## Show how r2 := h(resp) is defined:
with(VerbAgg, stopifnot( identical(r2, {
r <- factor(resp, ordered=FALSE); levels(r) <- c("N","Y","Y"); r})))
xtabs(~ item + resp, VerbAgg)
xtabs(~ btype + resp, VerbAgg)
round(100 * ftable(prop.table(xtabs(~ situ + mode + resp, VerbAgg), 1:2), 1))
person <- unique(subset(VerbAgg, select = c(id, Gender, Anger)))
require(lattice)
densityplot(~ Anger, person, groups = Gender, auto.key = list(columns = 2),
xlab = "Trait Anger score (STAXI)")
if(lme4:::testLevel() >= 3) { ## takes about 15 sec
print(fmVA <- glmer(r2 ~ (Anger + Gender + btype + situ)^2 +
(1|id) + (1|item), family = binomial, data =
VerbAgg), corr=FALSE)
}
## much faster but less accurate
print(fmVA0 <- glmer(r2 ~ (Anger + Gender + btype + situ)^2 +
(1|id) + (1|item), family = binomial, data =
VerbAgg, nAGQ=0L), corr=FALSE)