Plot Function for Unidimensional Item Response Models
S3 plot method for objects of class tam
, tam.mml
or tam.mml
.
## S3 method for class '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 class '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 class '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, ...)
x |
Object of class |
items |
An index vector giving the items to be visualized. |
type |
Plot type. |
low |
Lowest θ value to be displayed |
high |
Highest θ value to be displayed |
ngroups |
Number of score groups to be displayed. The default are six groups. |
groups_by_item |
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. |
wle |
Use WLE estimate for displaying observed scores. |
export |
A logical which indicates whether all graphics should be separately
exported in files of type |
export.type |
A string which indicates the type of the graphics export. For currently
supported file types, see
|
export.args |
A list of arguments that are passed to the export method can be specified. See the respective export device method for supported usage. |
observed |
A logical which indicates whether observed response curve should be displayed |
overlay |
A logical indicating whether expected score functions should overlay. |
ask |
A logical which asks for changing the graphic from item to item.
The default is |
package |
Used R package for plot. Can be |
fix.devices |
Optional logical indicating whether old graphics devices should be saved. |
nnodes |
Number of θ 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)
Margaret Wu, Thomas Kiefer, Alexander Robitzsch, Michal Modzelewski
See CDM::IRT.irfprobPlot
for a general plot method.
## Not run: ############################################################################# # 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 ) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.