# Data preparation
## Random weights creation
set.seed(1919)
wt <- sample(x = 1:4, size = nrow(dichodata), replace = TRUE)
# Item analysis for multiple choice items
ctitem(x = dichodata, key = dichokey, itemcategories = c('A','B','C','D'), wt = wt)
Run the code above in your browser using DataLab