The irtPlot function is a flexible utility used to create publication-quality graphics for various aspects of dichotomous IRT models. This function also provides several useful utilities to facilitate graphic creation. The general flow of tasks within the function is as follows:

Getting Started

Essential

irtPlot is part of the irtPlot package available on github. To download the package, install the devtools package and run the following lines:

library(devtools)
install_github("ppanko/irtPlot")

Before using irtPlot, the user must provide two primary arguments. First, the user must declare a data set for which he or she wishes to create graphics. Second, a sequence of theta values should be selected in order to plot the parameters. In the example below, the data are drawn from ltm package and the theta values are chosen accordingly using the seq function.

library(irtPlot)
data <- LSAT
theta <- seq(-6,3, 0.01)

Next, the user must choose which model and type to plot. This function supports "1PL", "2PL", and "3PL" models as well as Item Characteristic Curves ("icc"), Test Characterstic Curves ("tcc"), Item Information Functions ("iif"), Test Information Functions ("tif"), and Ability Parameter Estimation ("likl", "logl") types. See relevant sections below for more information on types.

Options

Having dispensed with the required arguments, the user is free to select a number of optional commands to personalize the desired plot. Most of the the arguments in this section are used to tweak default setting for the save utility.

The user is encouraged to view the help files using the ?irtPlot function.

I. Item & Test Charactersitic Curves

For dichotomous items, Item Characteristic Curves are used to model the probability of answering a given item correctly across a range of ability values. The 3PL probability of a correct answer for ability s on item i is given by the following formula:

$$P(Y_{is}=1|\theta_s) = c_i + (1 - c_i)\frac{exp(1.7a_i(\theta_s - b_i))}{1 + exp(1.7a_i(\theta_s - b_i))}$$

Similarly, Test Characteristic Curves represent the probability of observing a certain response total over a range of ability values. The probability of the expected score on the test for ability s is shown below:

$$TCC(\theta_s) = \sum_{i=1}^I P(Y_{is} = 1|\theta_s)$$

Examples using the LSAT data are shown below for each type of plot.

Back to top \ Next Section


irtPlot(data, theta, model = "3PL", type = "icc")
irtPlot(data, theta, model = "3PL", type = "tcc")

II. Item & Test Information Functions

The measurement reliability of a given item can be approximated using Item Information Function. The information of a given item i can be plotted against a range of $\theta$ values to determine the usefulness of i across ability levels, as shown below:

$$I_i(\theta) = \frac{1.7_2a_i^2(1-c_i)}{[c_i + exp(1.7a_i(\theta - b_i))][1 + exp(1.7a_i(\theta - b_i))]}$$

Furthermore, the reliability of a test across ability levels can be estimated by summing the i items of a given model:

$$I(\theta) = \sum_{i = 1}^I I_i(\theta) $$

Examples of each plot type are shown below.

Previous Section \ Back to top \ Next Section


irtPlot(data, theta, model = "3PL", type = "iif")
irtPlot(data, theta, model = "3PL", type = "tif")

III. Ability Parameter Estimation

The likelihood of a given response pattern can be computed for a set of ability values. This process can be used to determine a participant's ability level indicated by a peak in the plotted curve. The formula below shows the computational form of the likelihood for person n for item set j given $\theta$:

$$L(u_1...,u_j...,u_n|\theta) = \prod_{j = 1}^n P_j^{u_j} (1-P_j)^{1-u_j}$$

Additionally, it is also possible to plot the log-likelihood estimates. This transformation can be expressed:

$$ln[L(\mathbf{u}|\theta)] = \sum_{j = 1}^n [u_jlnP_j + (1 - u_j)ln(1 - P_j)]$$

Note: Due to the fact that likelihoods are computed for one row at a time, this function make take a very long time with a large data sets. Users are strongly encouraged to use the subS = data[x,] where data is the data frame entered in the first argument and x is a vector of select observations.

Previous Section \ Back to top \ Next Section


irtPlot(data, theta, model = "2PL", type = "likl", subS = data[1,])
irtPlot(data, theta, model = "2PL", type = "logl", subS = data[1,])

References

Embertson, S.E., & Reise, S. P. (2000). Item Response Theory for Psychologists. Hillsdale, NJ: Erlbaum.

Lee, J. (2016). Lectures on Item Response Theory. Personal Collection of J. Lee, Texas Tech University, Lubbock, TX.

Rizopoulos D. (2006). ltm: An R package for Latent Variable Modelling and Item Response Theory Analyses. Journal of Statistical Software, 17(5), 1-25. URL http://www.jstatsoft.org/v17/i05/

Wickham, H. (2009). ggplot2: Elegant Graphics for Data Analysis. New York: Springer-Verlag.

See Also

  • difPlot
  • polyPlot

Back to top

Please leave comments at the project repository: https://www.github.com/ppanko/irtPlot



ppanko/irtPlot documentation built on May 25, 2019, 11:24 a.m.