Learn R Programming

mirt (version 1.3)

plot-method: Plot various test implied functions from models

Description

Plot various test implied response functions from models estimated in the mirt package.

Usage

## S3 method for class 'ExploratoryClass,missing':
plot(x, y, type = "info", npts = 50,
  theta_angle = 45, theta_lim = c(-4, 4), which.items = 1:ncol(x@data),
  rot = list(xaxis = -70, yaxis = 30, zaxis = 10), facet_items = TRUE,
  auto.key = TRUE, main = NULL, drape = TRUE, colorkey = TRUE,
  ehist.cut = 1e-10, add.ylab2 = TRUE, ...)

Arguments

x
an object of class ExploratoryClass, ConfirmatoryClass or MultipleGroupClass
y
an arbitrary missing argument required for R CMD check
type
type of plot to view; can be 'info' to show the test information function, 'infocontour' for the test information contours, 'SE' for the test standard error function, 'trace' and 'infotrace
theta_angle
numeric values ranging from 0 to 90 used in plot. If a vector is used then a bubble plot is created with the summed information across the angles specified (e.g., theta_angle = seq(0, 90, by=10))
theta_lim
lower and upper limits of the latent trait (theta) to be evaluated, and is used in conjunction with npts
npts
number of quadrature points to be used for plotting features. Larger values make plots look smoother
rot
allows rotation of the 3D graphics
which.items
numeric vector indicating which items to be used when plotting. Default is to use all available items
facet_items
logical; apply grid of plots across items? If FALSE, items will be placed in one plot for each group
auto.key
logical parameter passed to the lattice package
ehist.cut
a probability value indicating a threshold for excluding cases in empirical histogram plots. Values larger than the default will include more points in the tails of the plot, potentially squishing the 'meat' of the plot to take up less area than v
main
argument passed to lattice. Default generated automatically
drape
logical argument passed to lattice. Default generated automatically
colorkey
logical argument passed to lattice. Default generated automatically
add.ylab2
logical argument passed to lattice. Default generated automatically
...
additional arguments to be passed to lattice

Examples

Run this code
x <- mirt(Science, 1)
plot(x)
plot(x, type = 'trace')
plot(x, type = 'infotrace')
plot(x, type = 'infotrace', facet_items = FALSE)
plot(x, type = 'infoSE')

set.seed(1234)
group <- sample(c('g1','g2'), nrow(Science), TRUE)
x2 <- multipleGroup(Science, 1, group)
plot(x2)
plot(x2, type = 'trace')
plot(x2, type = 'trace', which.items = 1:2)
plot(x2, type = 'trace', which.items = 1, facet_items = FALSE) #facet by group
plot(x2, type = 'score')

x3 <- mirt(Science, 2)
plot(x3)
plot(x3, type = 'SE')

Run the code above in your browser using DataLab