traceline: Compute Item/Test Characteristic Functions

Description Usage Arguments Value Author(s) See Also Examples

View source: R/trace.R

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

1
traceline(x, theta, D = 1)

Arguments

x

A data.frame containing the item meta data (e.g., item parameters, number of categories, models ...). See irtfit, test.info, or simdat for more details about the item meta data. This data.frame can be easily obtained using the function shape_df.

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.

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.

Author(s)

Hwanggyu Lim hglim83@gmail.com

See Also

plot.traceline

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## example
## using a "-prm.txt" file obtained from a flexMIRT
flex_prm <- system.file("extdata", "flexmirt_sample-prm.txt", package = "irtplay")
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)

cswells1/MeasInv documentation built on Dec. 19, 2021, 7 p.m.