Learn R Programming

mirt (version 1.1)

expected.item: Function to calculate expected value of item

Description

Given an internal mirt object extracted from an estimated model compute the expected value for an item given the ability parameter(s).

Usage

expected.item(x, Theta, min = 0)

Arguments

x
an extracted internal mirt object containing item information
Theta
a vector (unidimensional) or matrix (multidimensional) of latent trait values
min
a constant value added to the expected values indicating the lowest theoretical category. Default is 0

See Also

extract.item

Examples

Run this code
mod <- mirt(Science, 1)
extr.2 <- extract.item(mod, 2)
Theta <- fscores(mod, full.scores=TRUE, scores.only=TRUE)
expected <- expected.item(extr.2, Theta, min(Science[,1])) #min() of first item

head(data.frame(expected, Theta=Theta))

Run the code above in your browser using DataLab