Thanks @avehtari for clarifying my confusion.
Another question; I read your replies in the post Incorrect recovery using LOO and WAIC fit indices - #6 by Rehab. I believe my data structure is same as that described in the post. With regard to your comment,
while in generated quantities you either
- make it vector if you want to calculate leave one observation away
- sum over i if you want to leave out one item
- sum over j if you want to leave out one examinee
and if I structure the log_lik as an S-by-J matrix as given in the second code block above, and use loo(), does that mean I am leaving out one subject? Just asked this so that I can correctly interpret the result, in case implementing loo() is successful.
Suppose if the loo() is successful, how is the interpretation of result different from the leave-one-group-out CV explained in Section 5.3 of Cross-validation for hierarchical models?
Thanks