infoplot {psychotools} | R Documentation |
Base graphics plotting function for information plot visualization of IRT models.
infoplot(object, what = c("categories", "items", "test"), ref = NULL, items = NULL, names = NULL, layout = NULL, xlim = NULL, ylim = NULL, col = NULL, lty = NULL, lwd = NULL, main = NULL, legend = TRUE, xlab = "Latent trait", ylab = "Information", add = FALSE, ...)
object |
a fitted model object of class
|
what |
character, specifying the type of information to visualize. |
ref |
argument passed over to internal calls of |
items |
character or numeric, specifying the items for which information curves should be visualized. |
names |
character, specifying labels for the items. |
layout |
matrix, specifying how the item or category information
curves of different items should be arranged. If |
xlim, ylim |
numeric, specifying the x and y axis limits. |
col |
character, specifying the colors of the test, item or category information curves. |
lty |
numeric, specifying the line type of the information curves. |
lwd |
numeric, specifying the line width of the information curves. |
main |
character, specifying the overall title of the plot. |
legend |
logical, specifying if a legend is drawn when multiple
item information curves are overlayed. The labels in the legend
correspond to the item names (which can be
specified in the argument |
xlab, ylab |
character, specifying the x and y axis labels. |
add |
logical. If |
... |
further arguments passed to internal calls
of |
The information plot visualization illustrates the test, item
or category information as a function of the ability parameter
θ under a certain IRT model. Further details on the
computation of the displayed information can be found on the
help page of the function predict.pcmodel
.
curveplot
, regionplot
,
profileplot
, piplot
## Load Verbal Aggression data data("VerbalAggression", package = "psychotools") ## Fit Rasch and partial credit ## model to Verbal Aggression data rmmod <- raschmodel(VerbalAggression$resp2) pcmod <- pcmodel(VerbalAggression$resp) ## Category information plots for all items under ## the dichotomous Rasch model plot(rmmod, type = "information", what = "categories") ## Category information plots for all items under ## the partial credit model plot(pcmod, type = "information", what = "categories") ## Overlayed item information plots for the first six ## item of the Verbal Aggression data set under ## the partial credit model plot(pcmod, type = "information", what = "items", items = 1:6) ## A comparison of the item information for the first six ## items under the dichotomous Rasch and the partial credit model plot(pcmod, type = "information", what = "items", items = 1:6, xlim = c(-5, 5)) plot(rmmod, type = "information", what = "items", items = 1:6, lty = 2, add = TRUE) legend(x = "topright", legend = c("PCM", "RM"), lty = 1:2, bty = "n") ## A comparison of the test information based on all items ## of the Verbal Aggression data set under the dichotomous Rasch ## and the partial credit model plot(pcmod, type = "information", what = "test", items = 1:6, xlim = c(-5, 5)) plot(rmmod, type = "information", what = "test", items = 1:6, lty = 2, add = TRUE) legend(x = "topright", legend = c("PCM", "RM"), lty = 1:2, bty = "n")