generate_item: Generate a random Item object

Description Usage Arguments Value Author(s) Examples

View source: R/generate_objects.R

Description

Generate a random Item object

Usage

1
generate_item(model = "3PL", n_categories = 4, se = NULL, ...)

Arguments

model

The model of the Item object.

n_categories

For polytomous models, the number of categories for an 'item' object.

se

The values of parameter standard errors, i.e. a list object with elements named as parameter names (excluding "D" parameter).

If the value is TRUE, this function will generate standard error values from a uniform distribution between 0.05 and 0.75 for each parameter.

...

Additional parameters passed to item() function.

Value

An Item-class object

Author(s)

Emre Gonulates

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# By default, a '3PL' model Item generated
generate_item()
# Generate item pools for other models
generate_item("Rasch")
generate_item("1PL")
generate_item("2PL")
generate_item("4PL")
# Polytomous items
generate_item("GRM")
generate_item("GPCM")
generate_item("PCM")
generate_item("GPCM2")
# Different number of categories
generate_item("GRM", n_categories = 2)
generate_item("GPCM", n_categories = 5)

# Generate standard errors for item parameters
generate_item(se = TRUE)

irt documentation built on Nov. 9, 2021, 9:07 a.m.