#make some data
set.seed(1234)
a <- matrix(rnorm(20),ncol=1)
d <- matrix(rnorm(20),ncol=1)
items <- rep('dich', 20)
data <- simdata(a,d, 2000, items)
x <- mirt(data, 1)
fit <- itemfit(x)
fit
itemfit(x, type = 'X2', empirical.plot = 1) #empirical item plot
Run the code above in your browser using DataLab