as.matrix,Response_set-method {irt} | R Documentation |
Convert a Response_set-class
object into a matrix
Description
This function converts Response_set-class
objects
to a matrix
object.
Usage
## S4 method for signature 'Response_set'
as.matrix(x, ..., output = "score", ip = NULL)
Arguments
x |
A |
... |
additional arguments |
output |
Contents of the matrix. The default value is
|
ip |
An |
Value
A matrix of examinee item scores within each row and items in each column.
Author(s)
Emre Gonulates
Examples
ip <- generate_ip(n = 15)
resp_set <- generate_resp_set(ip = ip, theta = rnorm(30), prop_missing = .5)
# Matrix of item scores
as.matrix(resp_set)
# If the item pool object provided, the column names will have the same
# order as the item order in item pool
as.matrix(resp_set, ip = ip)
# Matrix of raw responses
as.matrix(resp_set, output = "raw_response")
# Matrix of item order
as.matrix(resp_set, output = "order")
# Matrix of item ids
as.matrix(resp_set, output = "item_id")
[Package irt version 0.2.9 Index]