5.8 M-step
Based on the quantities calculated from the E-step, the M-step estimates item parameters of all items. For item \(j\), we have
\[\begin{equation} \hat{g}_j=\frac{R_j^{(0)}}{N_j^{(0)}} \end{equation}\] \[\begin{equation} \hat{s}_j=1-\frac{R_j^{(1)}}{N_j^{(1)}} \end{equation}\] For item 5,
Code
<- sum(P.alphac.given.yi[, 1:3])
Nj0 <- sum(P.alphac.given.yi[, 4])
Nj1 <- sum(y[, 5] * rowSums(P.alphac.given.yi[, 1:3]))
Rj0 <- sum(y[, 5] * P.alphac.given.yi[, 4])
Rj1
<- Rj0/Nj0
g5 <- 1 - Rj1/Nj1 s5
## Item 5 guessing = 0.47
## Item 5 slip = 0.25
Exercise 5.4 Find the estimated guessing and slip parameters for item 1.
Click for Answer
Code
<- sum(P.alphac.given.yi[, 1:3])
Nj0 <- sum(P.alphac.given.yi[, 4])
Nj1 <- sum(y[, 1] * rowSums(P.alphac.given.yi[, 1:3]))
Rj0 <- sum(y[, 1] * P.alphac.given.yi[, 4])
Rj1
<- Rj0/Nj0
g1 <- 1 - Rj1/Nj1
s1
cat("Item 1 guessing =", g1, "\nItem 1 slip =", s1)
## Item 1 guessing = 0.39
## Item 1 slip = 0.38