LtoL_single.tree: Long-to-long, single tree

Description Usage Arguments Details

View source: R/pretree.R

Description

Recode a long format data frame to a long format IRTrees data frame in the case when items have the same tree structure

Usage

1
2
3
4
5
6
7
8
9
LtoL_single.tree(
  data,
  cmx,
  id.col,
  item.col,
  resp.col,
  covar.col = NULL,
  time.col = NULL
)

Arguments

data

a long-format (person-item-response) data set

cmx

a a category-by-node mapping matrix

id.col

the person ID column

item.col

the item ID column

resp.col

the response column

covar.col

columns containing covariates

time.col

the time column. If not NULL, time.col should be nested in id.col, since it indicates repeated measures within persons

Details

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.


irtrees documentation built on Dec. 15, 2021, 1:08 a.m.