df: a data frame of individual survey data, where each row is an individual
vars_metric: a character vector of items to use in the Rasch Analysis
testlet_strategy: a list giving the strategy to take for creating testlets, passed to rasch_testlet(). One element of the list per testlet to create. Each element of the list must be a character vector of column names to use for the testlet. Optionally, name the element of the list to give the name of the new testlet. Otherwise, the new testlet will be the original column names separated by "_". Default is NULL, to not create testlets.
max_values: a tibble with two columns, var equivalent to vars_metric and max_val with their corresponding maximum possible values
resp_opts: a numeric vector of possible response options for vars_metric. Must begin with 1. Default is 1:5
Returns
a named list with: - df: new df after creating desired testlets
vars_metric: new vars_metric after creating desired testlets
testlet_strategy: new testlet_strategy after creating desired testlets
max_values: new max_values after creating desired testlets
Details
If high local item dependence is observed (i.e., residual correlation) is observed between items, it may be desirable to combine them into a testlet. This code creates the testlets as desired.