10.5 Estimating 2×2 Contingency Table

To estimate the table for attribute k, we need to know P(αik=a|yi) and I(α^ik=b|yi). Let us take student 8 as an example. Run the following code:

Code
library(GDINA)
Y <- ecpe$dat
Q <- ecpe$Q
lcdm <- GDINA(Y, Q, model = "GDINA", verbose = 0)
mp <- personparm(lcdm, "mp")
mp.student8 <- mp[8, ]
mp.student8
##     A1     A2     A3 
## 0.0041 0.4801 0.9648

Recall that p^00=1ni=1nP(αik=0|yi)I(α^ik=0|yi) Verify that for attribute 1 (i.e., k=1) and student 8 (i.e., i=8), I(α^ik=0|yi)=1 and P(αik=0|yi)= 0.9959