Summarizing and Visualizing Item Response Data
Summarizing and visualizing "itemresp"
data objects.
## S3 method for class 'itemresp' summary(object, items = NULL, abbreviate = FALSE, mscale = TRUE, simplify = TRUE, sep = " ", ...) ## S3 method for class 'itemresp' plot(x, xlab = "", ylab = "", items = NULL, abbreviate = FALSE, mscale = TRUE, sep = "\n", off = 2, axes = TRUE, names = TRUE, srt = 45, adj = c(1.1, 1.1), ...)
object, x |
an object of class |
items |
character or integer for subsetting the items to be summarized/visualized. By default, all items are used. |
abbreviate |
logical or integer. Should scale labels be abbreviated? Alternatively, an integer with the desired abbreviation length. The default is some heuristic based on the length of the labels. |
mscale |
logical. Should mscale values be used for printing/plotting?
If |
simplify |
logical. Should the summary table be collapsed into a matrix or returned as a list? |
sep |
character. A character for separating item labels from their corresponding scale labels (if any). |
xlab, ylab, off, axes, ... |
arguments passed to |
names |
logical or character. If |
srt, adj |
numeric. Angle ( |
The plot
method essentially just calls summary
(passing on most further
arguments) and then visualizes the result as a spineplot
.
## summary/visualization for verbal aggression data data("VerbalAggression", package = "psychotools") r <- itemresp(VerbalAggression$resp[, 1:6]) mscale(r) <- c("no", "perhaps", "yes") summary(r) plot(r) ## modify formatting of mscale summary(r, abbreviate = 1) summary(r, mscale = FALSE) ## illustration for varying mscale across items ## merge with additional random binary response b <- itemresp(rep(c(-1, 1), length.out = length(r)), mscale = c(-1, 1), labels = "Dummy") rb <- merge(r[, 1:2], b) head(rb, 2) ## summary has NAs for non-existent response categories summary(rb) summary(rb, mscale = FALSE) plot(rb, srt = 25) plot(rb, mscale = FALSE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.