Learn R Programming

irt (version 0.1.1)

itempool: Create an Itempool object

Description

This method creates a new Itempool-class object.

Usage

itempool(...)

Arguments

...

The object that is desired to be converted to an 'Itempool' object. Also additional arguments related to the Itempool.

Value

An Itempool-class object.

Examples

Run this code
# NOT RUN {
# Create an item pool with two 2PL items
itempool(a = c(1, 1.4), b = c(-2, 1))
itempool(a = c(1, 1.4), b = c(-2, 1), model = "2PL")
# Set D parameter
itempool(a = c(1, 1.4), b = c(-2, 1), D = 1.7)
# Set item IDs
itempool(a = c(1, 1.4), b = c(-2, 1), id = c("i1", "i2"))
# Set content
itempool(a = c(1, 1.4), b = c(-2, 1), content = c("Algebra", "Geometry"))

# Create GRM (Graded Response Model) items
itempool(data.frame(a = rlnorm(10, 0, .3), b1 = rnorm(10), b2 = rnorm(10)),
          model = "GRM")

# Create a Rasch model item pool
itempool(b = c(-1, 0.2, 1.1), model = "Rasch")

# Add 'misc' field:
ip <- itempool(b = rnorm(2), id = paste0("t1-i", 1:2),
                misc = list(list(sympson_hetter_k = .8),
                            list(sympson_hetter_k = .9)))
ip[[1]]  # First item of the item pool

# }

Run the code above in your browser using DataLab