# Data preparation
## Scored data
corr <- correct(x = dichodata, key = dichokey, navalue = NA)
## Random administered matrix
set.seed(1919)
admin <- sample(x = 0:1, size = nrow(corr)*ncol(corr), replace = TRUE, prob = c(.05,.95))
admin <- matrix(data = as.logical(admin),nrow = nrow(corr))
head(admin)
# Person statistics with all items administered
ex1 <- ctperson(x = corr)
head(ex1)
# Person statistics with NOT all items administered
ex2 <- ctperson(x = corr, administered = admin)
head(ex2)
Run the code above in your browser using DataLab