plot.tam.Rd
S3 plot method for objects of class tam
, tam.mml
or tam.mml
.
# S3 method for tam
plot(x, items=1:x$nitems, type="expected", low=-3, high=3, ngroups=6,
groups_by_item=FALSE, wle=NULL, export=TRUE, export.type="png",
export.args=list(), observed=TRUE, overlay=FALSE,
ask=FALSE, package="lattice", fix.devices=TRUE, nnodes=100, ...)
# S3 method for tam.mml
plot(x, items=1:x$nitems, type="expected", low=-3, high=3, ngroups=6,
groups_by_item=FALSE, wle=NULL, export=TRUE, export.type="png",
export.args=list(), observed=TRUE, overlay=FALSE,
ask=FALSE, package="lattice", fix.devices=TRUE, nnodes=100, ...)
# S3 method for tam.jml
plot(x, items=1:x$nitems, type="expected", low=-3, high=3, ngroups=6,
groups_by_item=FALSE, wle=NULL, export=TRUE, export.type="png",
export.args=list(), observed=TRUE, overlay=FALSE,
ask=FALSE, package="lattice", fix.devices=TRUE, nnodes=100, ...)
Object of class tam
, tam.mml
or tam.mml
.
An index vector giving the items to be visualized.
Plot type. type="expected"
plot the expected item
response curves while type="items"
plots the response
curves of all item categories.
Lowest \(\theta\) value to be displayed
Highest \(\theta\) value to be displayed
Number of score groups to be displayed. The default are six groups.
Logical indicating whether grouping of persons should be conducted item-wise. The groupings will differ from item to item in case of missing item responses.
Use WLE estimate for displaying observed scores.
A logical which indicates whether all graphics should be separately
exported in files of type export.type
in a subdirectory 'Plots'
of the working directory.
A string which indicates the type of the graphics export. For currently
supported file types, see
grDevices::dev.new
.
A list of arguments that are passed to the export method can be specified. See the respective export device method for supported usage.
A logical which indicates whether observed response curve should be displayed
A logical indicating whether expected score functions should overlay.
A logical which asks for changing the graphic from item to item.
The default is FALSE
.
Used R package for plot. Can be "lattice"
or
"graphics"
.
Optional logical indicating whether old graphics devices should be saved.
Number of \(\theta\) points at which item response functions are evaluated
Further arguments to be passed
This plot method does not work for multidimensional item response models.
A plot and list of computed values for plot
(if saved as an object)
See CDM::IRT.irfprobPlot
for a general plot method.
if (FALSE) {
#############################################################################
# EXAMPLE 1: Dichotomous data data.sim.rasch
#############################################################################
data(data.sim.rasch)
mod <- TAM::tam.mml(data.sim.rasch)
# expected response curves
plot(mod, items=1:5, export=FALSE)
# export computed values
out <- plot(mod, items=1:5, export=FALSE)
# item response curves
plot(mod, items=1:5, type="items", export=FALSE)
# plot with graphics package
plot(mod, items=1:5, type="items", export=FALSE, ask=TRUE, package="graphics")
#############################################################################
# EXAMPLE 2: Polytomous data
#############################################################################
data(data.Students, package="CDM")
dat <- data.Students[, c("sc3","sc4", "mj1", "mj2" )]
dat <- na.omit(dat)
dat[ dat[,1]==3, 1 ] <- 2 # modify data
dat[ 1:20, 2 ] <- 4
# estimate model
mod1 <- TAM::tam.mml( dat )
# plot item response curves and expected response curves
plot(mod1, type="items", export=FALSE)
plot(mod1, type="expected", export=FALSE )
}