[R] –irtoys –
For binary response data Provides common interface to some functions of –ICL (external to R) –BILOG (external to R) –ltm (R function) Syntax used is simpler and consistent across these packages Other useful IRT functions ~ NPP Good plotting capabilities
Dataset BDI (21 items) 818 subjects See word-doc for items Split the items into three sets:
Dataset 1: descript(beck[,c(2,5,8,11,14,17,20)]) Sample: 7 items and 818 sample units; 0 missing values Proportions for each level of response: 0 1 logit t1bdi t1bdi t1bdi t1bdi t1bdi t1bdi t1bdi Frequencies of total scores: Freq Biserial correlation with Total Score: Included Excluded t1bdi t1bdi t1bdi t1bdi t1bdi t1bdi t1bdi Cronbach's alpha: value All Items Excluding t1bdi Excluding t1bdi Excluding t1bdi Excluding t1bdi Excluding t1bdi Excluding t1bdi Excluding t1bdi Pairwise Associations: Item i Item j p.value e e e e e <2e <2e <2e <2e <2e-16 00
-irtoys- fitting 1PL/2PL models irtoys_beck_1pl1 <- est(beck[,c(2,5,8,11,14,17,20)], model="1PL", engine="ltm") irtoys_beck_2pl1 <- est(beck[,c(2,5,8,11,14,17,20)], model="2PL", engine="ltm")
> irtoys_beck_2pl1 [,1] [,2] [,3] t1bdi t1bdi t1bdi t1bdi t1bdi t1bdi t1bdi > irtoys_beck_1pl1 [,1] [,2] [,3] t1bdi t1bdi t1bdi t1bdi t1bdi t1bdi t1bdi
par(mfrow = c(1,2)) plot(irf(irtoys_beck_1pl1), co=NA, main="1PL") plot(irf(irtoys_beck_2pl1), co=NA, main="2PL")
Compare with Non-parametric Plot 1PL/2PL response functions for each item and compare with non-parametric curve which does not assume logistic function par(mfrow = c(1,1)) npp(beck, items=c(2), from = -2, to = 4, main = "Item 2", co=3) plot(irf(irtoys_beck_1pl1[c(1),]), co="red", add = TRUE) plot(irf(irtoys_beck_2pl1[c(1),]), co="blue", add = TRUE)
Estimating ability th.mle_1pl1 <- mlebme(resp=beck[,c(2,5,8,11,14,17,20)], ip=irtoys_beck_1pl1) th.mle_1pl2 <- mlebme(resp=beck[,c(2,5,8,11,14,17,20)], ip=irtoys_beck_2pl1)
i1 i4 i7 i10 i13 i16 i PatternsAbility/SE for 1PLAbility/SE for 2PL
Zoom