# NOT RUN {
dat <- expand.table(LSAT7)
mod <- mirt(dat, 1)
areainfo(mod, c(-2,0), which.items = 1) #item 1
# }
# NOT RUN {
areainfo(mod, c(-2,0), which.items = 1:3) #items 1 to 3
areainfo(mod, c(-2,0)) # all items (total test information)
# plot the area
area <- areainfo(mod, c(-2,0))
Theta <- matrix(seq(-3,3, length.out=1000))
info <- testinfo(mod, Theta)
plot(info ~ Theta, type = 'l')
pick <- Theta >= -2 & Theta <=0
polygon(c(-2, Theta[pick], 0), c(0, info[pick], 0), col='lightblue')
text(x = 2, y = 0.5, labels = paste("Total Information:", round(area$TotalInfo, 3),
"\n\nInformation in (-2, 0):", round(area$Info, 3),
paste("(", round(100 * area$Proportion, 2), "%)", sep = "")), cex = 1.2)
# }
Run the code above in your browser using DataLab