Learn R Programming

irt (version 0.2.9)

info: Calculates the information of an "Item" object

Description

This function sets a generic method for calculating the information of a suitable object

Usage

info(ip, theta, tif = FALSE, observed = FALSE, resp = NULL)

# S4 method for Item info(ip, theta, tif = FALSE, observed = FALSE, resp = NULL)

# S4 method for Rasch info(ip, theta, tif = FALSE, observed = FALSE, resp = NULL)

# S4 method for 1PL info(ip, theta, tif = FALSE, observed = FALSE, resp = NULL)

# S4 method for 2PL info(ip, theta, tif = FALSE, observed = FALSE, resp = NULL)

# S4 method for 3PL info(ip, theta, tif = FALSE, observed = FALSE, resp = NULL)

# S4 method for 4PL info(ip, theta, tif = FALSE, observed = FALSE, resp = NULL)

# S4 method for PCM info(ip, theta, tif = FALSE, observed = FALSE, resp = NULL)

# S4 method for GRM info(ip, theta, tif = FALSE, observed = FALSE, resp = NULL)

# S4 method for GPCM info(ip, theta, tif = FALSE, observed = FALSE, resp = NULL)

# S4 method for GPCM2 info(ip, theta, tif = FALSE, observed = FALSE, resp = NULL)

# S4 method for Itempool info(ip, theta, tif = FALSE, observed = FALSE, resp = NULL)

# S4 method for Testlet info(ip, theta, tif = FALSE, observed = FALSE, resp = NULL)

# S4 method for numMatDfListChar info(ip, theta, tif = FALSE, observed = FALSE, resp = NULL)

Value

A vector (or matrix) consist of item or test information.

Arguments

ip

An Item-class, Itempool-class or Testlet-class object.

theta

An vector of ability parameters.

tif

If it is TRUE, function will return total information obtained from each item for a given theta. It simply adds information of individual items.

observed

If TRUE, observed information calculated instead of the default expected information.

resp

A response string (vector or a matrix). Necessary for observed information.

Author

Emre Gonulates

Examples

Run this code
info(ip = generate_item(model = "1PL"), theta = rnorm(1))
info(ip = generate_item(model = "2PL"), theta = rnorm(1))
info(ip = generate_item(model = "3PL"), theta = rnorm(1))
info(ip = generate_item(model = "4PL"), theta = rnorm(1))
info(ip = generate_item(model = "GRM"), theta = rnorm(1))
info(ip = generate_item(model = "GPCM"), theta = rnorm(1))
info(ip = generate_item(model = "PCM"), theta = rnorm(1))
info(ip = generate_item(model = "GPCM2"), theta = rnorm(1))

info(ip = generate_item(model = "Rasch"), theta = rnorm(1))

info(ip = generate_item(model = "1PL"), theta = rnorm(1))

info(ip = generate_item(model = "2PL"), theta = rnorm(1))

info(ip = generate_item(model = "3PL"), theta = rnorm(1))

info(ip = generate_item(model = "4PL"), theta = rnorm(1))

info(ip = generate_item(model = "PCM"), theta = rnorm(1))

info(ip = generate_item(model = "GRM"), theta = rnorm(1))

info(ip = generate_item(model = "GPCM"), theta = rnorm(1))

info(ip = generate_item(model = "GPCM2"), theta = rnorm(1))

info(ip = generate_ip(model = "Rasch"), theta = rnorm(1))
info(ip = generate_ip(model = "1PL"), theta = rnorm(1))
info(ip = generate_ip(model = "2PL"), theta = rnorm(1))
info(ip = generate_ip(model = "3PL"), theta = rnorm(1))
info(ip = generate_ip(model = "4PL"), theta = rnorm(1))
info(ip = generate_ip(model = "GRM"), theta = rnorm(1))
info(ip = generate_ip(model = "GPCM"), theta = rnorm(1))
info(ip = generate_ip(model = "PCM"), theta = rnorm(1))
info(ip = generate_ip(model = "GPCM2"), theta = rnorm(1))

# Multiple Thetas
info(ip = generate_ip(model = "3PL"), theta = rnorm(5))
info(ip = generate_ip(model = "GRM"), theta = rnorm(7))

# Test information function value at theta
info(ip = generate_ip(model = "3PL"), theta = rnorm(5), tif = TRUE)
info(ip = generate_ip(model = "GRM"), theta = rnorm(7), tif = TRUE)

# Information values of an item pool with multiple models
ip <- generate_ip(model = c("2PL", "3PL", "GPCM", "3PL", "GPCM"))
theta <- rnorm(sample(6:10, 1))
info(ip = ip, theta = theta[1])
info(ip = ip, theta = theta)
info(ip = ip, theta = theta, tif = TRUE)

t1 <- generate_testlet(item_models = c("2PL", "3PL", "GRM", "3PL", "GRM"))
theta <- rnorm(sample(6:10, 1))
info(ip = t1, theta = theta[1])
info(ip = t1, theta = theta)
info(ip = t1, theta = theta, tif = TRUE)

Run the code above in your browser using DataLab