Incorrect recovery using LOO and WAIC fit indices

y[i,j] means responses of ( examinees i = 1, …, N ) to a set of ( items j = 1,…, J )
I think I should leave out a pair of (examinee, item) each time. I’m not sure.

As far as I understand, I’m collecting them in the model block in order to compute the log of the target posterior distribution. While in the generated block, we need the log likelihood for each pair of (examinee, item). Or should I also collect them in the generated block?

K means that there is k subpopulations under the unified population. It is similar that my population consists of people who have k distincts features. For example, low ability and hight ability groups.

I’ll modify the code and add this part.

Thank you for taking the time to look at my code.