Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

loadItemPool

Load item pool


Description

loadItemPool is a data loading function to create an item_pool object. loadItemPool can read item parameters and standard errors from a data.frame or a .csv file.

Usage

loadItemPool(ipar, ipar_se = NULL, file = NULL, se_file = NULL, unique = FALSE)

Arguments

ipar

item parameters. Can be a data.frame or the file path of a .csv file. The content should at least include columns 'ID' and 'MODEL'.

ipar_se

(optional) standard errors. Can be a data.frame or the file path of a .csv file.

file

(deprecated) use ipar argument instead.

se_file

(deprecated) use ipar_se argument instead.

unique

if TRUE, item IDs must be unique to create a valid item_pool object. (default = FALSE)

Value

loadItemPool returns an item_pool object.

  • ni the number of items in the pool.

  • max_cat the maximum number of response categories across all items in the pool.

  • index the numeric item index of each item.

  • id the item ID string of each item.

  • model the object class names of each item representing an item model type. Can be item_1PL, item_2PL, item_3PL, item_PC, item_GPC, or item_GR.

  • NCAT the number of response categories of each item.

  • parms a list containing the item object of each item.

  • ipar a matrix containing all item parameters.

  • se a matrix containing all item parameter standard errors. The values will be 0 if the argument ipar_se was not supplied.

  • raw the original input data.frame used to create this object.

See Also

Examples

## Read from data.frame:
itempool_science <- loadItemPool(itempool_science_data)

## Read from file: write to tempdir() for illustration and clean afterwards
f <- file.path(tempdir(), "itempool_science.csv")
write.csv(itempool_science_data, f, row.names = FALSE)
itempool_science <- loadItemPool(f)
file.remove(f)

## TestDesign 1.1.0 - Deprecated arguments
## Not run: 
loadItemPool(ipar = "ipar.csv", ipar_se = "se.csv") # is equivalent to
loadItemPool(file = "ipar.csv", se_file = "se.csv") # pre 1.1.0

## End(Not run)

TestDesign

Optimal Test Design Approach to Fixed and Adaptive Test Construction

v1.2.2
GPL (>= 2)
Authors
Seung W. Choi [aut, cre] (<https://orcid.org/0000-0003-4777-5420>), Sangdon Lim [aut] (<https://orcid.org/0000-0002-2988-014X>)
Initial release
2021-01-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.