Recode a long format data frame to a wide format IRTRees data frame in the case when items may have different tree structures
LtoW_multi.tree(
data,
cmx_list,
item_list,
id.col,
item.col,
resp.col,
covar.col = NULL,
time.col = NULL
)
a long-format (person-item-response) data set
a list including all tree structures
a list of vectors, with a length matching the length of cmx_list
;
each element of such a vector points to an item ID in item.col
using the corresponding
mapping matrix
the person ID column
the item ID column
the response column
columns containing covariates
the time column. If not NULL, time.col
should be nested in id.col
, since it indicates repeated measures within persons
Many examples of mapping matrices are given in the vignette. Columns may be specified by numeric index or by name. Response categories must be coded with consecutive integers starting from 1, not 0. Missing data should be properly represented as NA.