```
set.seed(17)
d9 <- sim.irt(9,1000,-2.5,2.5,mod="normal") #dichotomous items
test <- irt.fa(d9$items)
test
op <- par(mfrow=c(3,1))
plot(test,type="ICC")
plot(test,type="IIC")
plot(test,type="test")
par(op)
set.seed(17)
items <- sim.congeneric(N=500,short=FALSE,categorical=TRUE) #500 responses to 4 discrete items
d4 <- irt.fa(items$observed) #item response analysis of congeneric measures
op <- par(mfrow=c(2,2))
plot(d4,type="ICC")
par(op)
#using the iq data set for an example of real items
#first need to convert the responses to tf
data(iqitems)
iq.keys <- c(4,4,3,1,4,3,2,3,1,4,1,3,4,3)
iq.tf <- score.multiple.choice(iq.keys,iqitems,score=FALSE) #just the responses
iq.irt <- irt.fa(iq.tf)
plot(iq.irt)
#select a subset of these variables
small.iq.irt <- irt.select(iq.irt,c(1,5,9,10,11,13))
small.irt <- irt.fa(small.iq.irt)
plot(small.irt)
#find the information for three subset of iq items
keys <- make.keys(14,list(all=1:14,some=c(1,5,9,10,11,13),others=c(1:5)))
plot(iq.irt,keys=keys)
```

Run the code above in your browser using DataLab