info {irtQ}R Documentation

Item and Test Information Function

Description

This function computes both item and test information functions (Hambleton et al., 1991) given a set of theta values.

Usage

info(x, ...)

## Default S3 method:
info(x, theta, D = 1, tif = TRUE, ...)

## S3 method for class 'est_item'
info(x, theta, tif = TRUE, ...)

## S3 method for class 'est_irt'
info(x, theta, tif = TRUE, ...)

Arguments

x

A data frame containing the item metadata (e.g., item parameters, number of categories, models ...), an object of class est_item obtained from the function est_item, or an object of class est_irt obtained from the function est_irt. The data frame of item metadata can be easily obtained using the function shape_df. See below for details.

...

Further arguments passed to or from other methods.

theta

A vector of theta values where item and test information values are computed.

D

A scaling factor in IRT models to make the logistic function as close as possible to the normal ogive function (if set to 1.7). Default is 1.

tif

A logical value. If TRUE, the test information function is computed. Default is TRUE.

Details

A specific form of a data frame should be used for the argument x. The first column should have item IDs, the second column should contain unique score category numbers of the items, and the third column should include IRT models being fit to the items. The available IRT models are "1PLM", "2PLM", "3PLM", and "DRM" for dichotomous item data, and "GRM" and "GPCM" for polytomous item data. Note that "DRM" covers all dichotomous IRT models (i.e, "1PLM", "2PLM", and "3PLM") and "GRM" and "GPCM" represent the graded response model and (generalized) partial credit model, respectively. The next columns should include the item parameters of the fitted IRT models. For dichotomous items, the fourth, fifth, and sixth columns represent the item discrimination (or slope), item difficulty, and item guessing parameters, respectively. When "1PLM" and "2PLM" are specified in the third column, NAs should be inserted in the sixth column for the item guessing parameters. For polytomous items, the item discrimination (or slope) parameters should be included in the fourth column and the item difficulty (or threshold) parameters of category boundaries should be contained from the fifth to the last columns. When the number of unique score categories differs between items, the empty cells of item parameters should be filled with NAs. In the irtQ package, the item difficulty (or threshold) parameters of category boundaries for GPCM are expressed as the item location (or overall difficulty) parameter subtracted by the threshold parameter for unique score categories of the item. Note that when an GPCM item has K unique score categories, K-1 item difficulty parameters are necessary because the item difficulty parameter for the first category boundary is always 0. For example, if an GPCM item has five score categories, four item difficulty parameters should be specified. An example of a data frame with a single-format test is as follows:

ITEM1 2 1PLM 1.000 1.461 NA
ITEM2 2 2PLM 1.921 -1.049 NA
ITEM3 2 3PLM 1.736 1.501 0.203
ITEM4 2 3PLM 0.835 -1.049 0.182
ITEM5 2 DRM 0.926 0.394 0.099

And an example of a data frame for a mixed-format test is as follows:

ITEM1 2 1PLM 1.000 1.461 NA NA NA
ITEM2 2 2PLM 1.921 -1.049 NA NA NA
ITEM3 2 3PLM 0.926 0.394 0.099 NA NA
ITEM4 2 DRM 1.052 -0.407 0.201 NA NA
ITEM5 4 GRM 1.913 -1.869 -1.238 -0.714 NA
ITEM6 5 GRM 1.278 -0.724 -0.068 0.568 1.072
ITEM7 4 GPCM 1.137 -0.374 0.215 0.848 NA
ITEM8 5 GPCM 1.233 -2.078 -1.347 -0.705 -0.116

See IRT Models section in the page of irtQ-package for more details about the IRT models used in the irtQ package. An easier way to create a data frame for the argument x is by using the function shape_df.

Value

This function returns an object of class info. This object contains item and test information values given the specified theta values.

Methods (by class)

Author(s)

Hwanggyu Lim hglim83@gmail.com

References

Hambleton, R. K., & Swaminathan, H. (1985) Item response theory: Principles and applications. Boston, MA: Kluwer.

Hambleton, R. K., Swaminathan, H., & Rogers, H. J. (1991) Fundamentals of item response theory. Newbury Park, CA: Sage.

See Also

plot.info, shape_df, est_item

Examples

## example 1.
## using the function "shape_df" to create a data frame of test metadata
# create a list containing the dichotomous item parameters
par.drm <- list(a=c(1.1, 1.2, 0.9, 1.8, 1.4),
               b=c(0.1, -1.6, -0.2, 1.0, 1.2),
               g=rep(0.2, 5))

# create a list containing the polytomous item parameters
par.prm <- list(a=c(1.4, 0.6),
               d=list(c(-1.9, 0.0, 1.2), c(0.4, -1.1, 1.5, 0.2)))

# create a numeric vector of score categories for the items
cats <- c(2, 4, 2, 2, 5, 2, 2)

# create a character vector of IRT models for the items
model <- c("DRM", "GRM", "DRM", "DRM", "GPCM", "DRM", "DRM")

# create an item metadata set
test <- shape_df(par.drm=par.drm, par.prm=par.prm,
                 cats=cats, model=model) # create a data frame

# set theta values
theta <- seq(-2, 2, 0.1)

# compute item and test information values given the theta values
info(x=test, theta=theta, D=1, tif=TRUE)


## example 2.
## using a "-prm.txt" file obtained from a flexMIRT
# import the "-prm.txt" output file from flexMIRT
flex_prm <- system.file("extdata", "flexmirt_sample-prm.txt",
                        package = "irtQ")

# read item parameters and transform them to item metadata
test_flex <- bring.flexmirt(file=flex_prm, "par")$Group1$full_df

# set theta values
theta <- seq(-2, 2, 0.1)

# compute item and test information values given the theta values
info(x=test_flex, theta=theta, D=1, tif=TRUE)



[Package irtQ version 0.2.0 Index]