loadItemPool {TestDesign} | R Documentation |
Load item pool
Description
loadItemPool
is a data loading function for creating 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, unique = FALSE)
Arguments
ipar |
item parameters. Can be a |
ipar_se |
(optional) standard errors. Can be a |
unique |
if |
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 beitem_1PL
,item_2PL
,item_3PL
,item_PC
,item_GPC
, oritem_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 argumentipar_se
was not supplied.raw
the original inputipar
argument used to create this object.raw_se
the original inputipar_se
argument used to create this object. If the argument was not supplied, this will be in the same structure with theipar
argument but the item parameter values will be filled with 0s.unique
the original inputunique
argument used to create this object.
See Also
dataset_science
, dataset_reading
, dataset_fatigue
, dataset_bayes
for examples.
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)