# \donttest{
data(iqitems)
iq.keys <- c(4,4,4, 6, 6,3,4,4, 5,2,2,4, 3,2,6,7)
psych::score.multiple.choice(iq.keys,iqitems) #this just gives summary statisics
#convert them to true false
iq.scrub <- psych::scrub(iqitems,isvalue=0) #first get rid of the zero responses
iq.tf <- psych::score.multiple.choice(iq.keys,iq.scrub,score=FALSE)
#convert to wrong (0) and correct (1) for analysis
psych::describe(iq.tf)
#see the ability data set for these analyses
#now, for some item analysis
iq.irt <- psych::irt.fa(iq.tf) #do a basic irt
iq.sc <- psych::scoreIrt(iq.irt,iq.tf) #find the scores
op <- par(mfrow=c(4,4))
psych::irt.responses(iq.sc[,1], iq.tf)
op <- par(mfrow=c(1,1))
# }
Run the code above in your browser using DataLab