Learn R Programming

irt (version 0.2.9)

mean,Item-method: Calculate the expected value of an Item

Description

mean Returns the expected value of an item for given parameters for a given ability or abilities, i.e. \(\theta\).

Usage

# S4 method for Item
mean(x, ...)

# S4 method for Rasch mean(x, ...)

# S4 method for 1PL mean(x, ...)

# S4 method for 2PL mean(x, ...)

# S4 method for 3PL mean(x, ...)

# S4 method for 4PL mean(x, ...)

# S4 method for GPCM mean(x, ...)

# S4 method for GPCM2 mean(x, ...)

# S4 method for GRM mean(x, ...)

# S4 method for PCM mean(x, ...)

Value

Item expected values at given theta(s) values will be returned.

Arguments

x

An Item-class object containing the item parameters.

...

Additional parameters. Specifically theta argument is required. theta should be a numeric vector of ability parameters.

Author

Emre Gonulates

Examples

Run this code
itm <- generate_item(model = "Rasch")
mean(itm, theta = 1)
mean(itm, -1.2)

itm <- generate_item(model = "GPCM", n_categories = 5)
mean(itm, theta = 1.5)
mean(itm, 0.2)

Run the code above in your browser using DataLab