Learn R Programming

irtplay (version 1.6.5)

traceline: Compute Item/Test Characteristic Functions

Description

This function computes the item category probabilities, item characteristic function, and test characteristic function given a set of theta values. The returned object of this function can be used to draw the item or test characteristic curve using the function plot.traceline.

Usage

traceline(x, ...)

# S3 method for default traceline(x, theta, D = 1, ...)

# S3 method for est_item traceline(x, theta, ...)

# S3 method for est_irt traceline(x, theta, ...)

Value

This function returns an object of class traceline. This object contains a list containing the item category probabilities, item characteristic function, and test characteristic function.

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. See irtfit, test.info, or simdat for more details about the item metadata. The data frame of item metadata can be easily obtained using the function shape_df.

...

Further arguments passed to or from other methods.

theta

A vector of theta values.

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.

Methods (by class)

  • default: Default method to compute the item category probabilities, item characteristic function, and test characteristic function for a data frame x containing the item metadata.

  • est_item: An object created by the function est_item.

  • est_irt: An object created by the function est_irt.

Author

Hwanggyu Lim hglim83@gmail.com

See Also

plot.traceline, est_item

Examples

Run this code
## example
## 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 = "irtplay")

# 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(-3, 3, 0.5)

# compute the item category probabilities and item/test
# characteristic functions given the theta values
traceline(x=test_flex, theta, D=1)

Run the code above in your browser using DataLab