1\docType{data}
2\name{VerbAgg}
3\alias{VerbAgg}
4\title{Verbal Aggression item responses}
5\format{A data frame with 7584 observations on the following 13 variables.
6  \describe{
7    \item{\code{Anger}}{the subject's Trait Anger score as measured on
8      the State-Trait Anger Expression Inventory (STAXI)}
9    \item{\code{Gender}}{the subject's gender - a factor with levels
10      \code{M} and \code{F}}
11    \item{\code{item}}{the item on the questionaire, as a factor}
12    \item{\code{resp}}{the subject's response to the item - an ordered
13      factor with levels \code{no} < \code{perhaps} < \code{yes}}
14    \item{\code{id}}{the subject identifier, as a factor}
15    \item{\code{btype}}{behavior type - a factor with levels
16      \code{curse}, \code{scold} and \code{shout}}
17    \item{\code{situ}}{situation type - a factor with levels
18      \code{other} and \code{self} indicating other-to-blame and self-to-blame}
19    \item{\code{mode}}{behavior mode - a factor with levels \code{want}
20      and \code{do}}
21    \item{\code{r2}}{dichotomous version of the response - a factor with
22      levels \code{N} and \code{Y}}
23  }}
24\source{
25  \url{http://bear.soe.berkeley.edu/EIRM/}
26}
27\description{
28  These are the item responses to a questionaire on verbal
29  aggression.  These data are used throughout De Boeck and
30  Wilson, \emph{Explanatory Item Response Models}
31  (Springer, 2004) to illustrate various forms of item
32  response models.
33}
34\examples{
35str(VerbAgg)
36## Show how  r2 := h(resp) is defined:
37with(VerbAgg, stopifnot( identical(r2, {
38     r <- factor(resp, ordered=FALSE); levels(r) <- c("N","Y","Y"); r})))
39
40xtabs(~ item + resp, VerbAgg)
41xtabs(~ btype + resp, VerbAgg)
42round(100 * ftable(prop.table(xtabs(~ situ + mode + resp, VerbAgg), 1:2), 1))
43person <- unique(subset(VerbAgg, select = c(id, Gender, Anger)))
44require(lattice)
45densityplot(~ Anger, person, groups = Gender, auto.key = list(columns = 2),
46            xlab = "Trait Anger score (STAXI)")
47
48if(lme4:::testLevel() >= 3) { ## takes about 15 sec
49    print(fmVA <- glmer(r2 ~ (Anger + Gender + btype + situ)^2 +
50 		   (1|id) + (1|item), family = binomial, data =
51		   VerbAgg), corr=FALSE)
52} ## testLevel() >= 3
53if (interactive()) {
54## much faster but less accurate
55    print(fmVA0 <- glmer(r2 ~ (Anger + Gender + btype + situ)^2 +
56                             (1|id) + (1|item), family = binomial,
57                         data = VerbAgg, nAGQ=0L), corr=FALSE)
58} ## interactive()
59}
60\references{
61  De Boeck and Wilson (2004), \emph{Explanatory Item
62  Response Models}, Springer.
63}
64\keyword{datasets}
65
66