get_cat_response_data: Extracts the response data of CAT output.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/cat_sim_helper_functions.R

Description

This function extracts the response data from a single cat_output object or a list of cat_output objects and gives either a vector (if there is a single cat_output object) or a matrix (if there is a lit of cat_output objects) of response data.

If cd, cat design, object is given, then the item pool in the cd will be used.

Usage

1
2
3
4
5
6
get_cat_response_data(
  cat_sim_output,
  cd = NULL,
  remove_na = FALSE,
  attach_summary = FALSE
)

Arguments

cat_sim_output

This is a list object containing elements that are "cat_output" class.

cd

A cat_design object that is created by function create_cat_design.

remove_na

If TRUE, the columns that are all NA will be removed.

attach_summary

If TRUE, the summary of each CAT will be attached to the beginning of the response string as columns. The default value is FALSE.

Value

This function returns a response matrix of adaptive tests. If the input is a list of cat_output, then the rows will represent examinees and columns will represent items. For single cat_output object the vector names will be the element

Author(s)

Emre Gonulates

See Also

cat_sim

Examples

1
2
3
4
5
6
7
8
9
n <- 40 # number of items
ip <- generate_ip(n = n,
                  content = sample(c("Algebra", "Arithmetic", "Geometry"),
                                   n, replace = TRUE))
cd <- create_cat_design(ip = ip, next_item_rule = 'mfi',
                        termination_rule = 'max_item',
                        termination_par = list(max_item = 10))
cat_data <- cat_sim(true_ability = rnorm(10), cd = cd)
get_cat_response_data(cat_sim_output = cat_data, cd)

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