# NOT RUN {
# category 2 for item 1 missing
dat <- Science
dat[,1] <- ifelse(Science[,1] == 2, 1, Science[,1])
apply(dat, 2, table)
# mirt() automatically remaps categories
mod <- mirt(dat, 1)
coef(mod, simplify=TRUE)
# this is the transformed data used by mirt()
remap_dat <- remap.distance(dat)
apply(remap_dat, 2, table)
# }
Run the code above in your browser using DataLab