Item-class
object.Get slots of the an Item-class
object.
# S4 method for Itempool
$(x, name)
An Itempool-class
object from which to extract
element(s) or in which to replace element(s).
Name of the parameter. Available values:
'id'
Extract id
's of all items
and testlets.
This will not extract the id
's of items within the
testlet.
'content'
Extract content
's of
all items and testlets.
This will not extract the content
's of items within the
testlet.
'model'
Extract model
's of
all items and testlets.
This will not extract the model
's of items within the
testlet.
'misc'
Extract misc
parameters of
all items and testlets.
This will not extract the misc
parameters of items
within the testlet.
'item_list'
Extract individual elements of
item pool. If there are testlets in the item pool, a testlet
will be an item of the resulting list. If individual items
within the testlet is desired to be elements of the list, then
use $items
.
'items'
Extract individual items
within the item pool. If there are testlets in the item pool
individual elements of the testlet will be extracted. Resulting
list will only consist of Item-class
objects.
'parameters'
Extract parameters
's of
all items and testlets.
This will not extract the parameters
's of items within
the testlet.
'se_parameters'
Extract
se_parameters
's of all items and testlets.
This will not extract the se_parameters
's of items
within the testlet.
'n'
Return a list with three objects:
elements
the number of standalone items and testlets.
testlets
the number of Testlet objects.
items
the sum of the number of items within testlets and
standalone items.
'max_score'
Returns the maximum possible raw score of the item pool.
'resp_id'
Extract
id
's of all standalone items and items within the
testlets. It will not return testlet id
's. This is
mainly to get the id
's of items which has a response.
'resp_content'
Extract
content
's of all standalone items and items within the
testlets. It will not return testlet content
's. This
is mainly to get the content
's of items which has a
response.
'resp_model'
Extract
model
's of all standalone items and items within the
testlets. It will not return testlet model
's. This is
mainly to get the model
's of items which has a response.
'resp_misc'
Extract
misc
fields of all standalone items and items within
the testlets. It will not return testlet misc
fields.
'resp_max_score'
Extract the maximum score each standalone item can get.
This operation will return a numeric object.
I wrote this method with the help of: https://stackoverflow.com/a/10961998/2275286
# NOT RUN {
item1 <- methods::new("Item", model = "3PL", id = 'item23',
content = 'Geometry',
parameters = list(b = 2, c = .12, a = 1.2, D = 1))
item1$a
item1$D
item1$model
item1$id
item1$content
# }
Run the code above in your browser using DataLab