As it follows the question on github https://github.com/arviz-devs/arviz/issues/668, may I ask @ahartikainen a very quick question: if my likelihood is censored, then I do not need to include the censored part in the likelihood, am I correct?
For example, I have
for (k in 1:N)
target += lognormal_lpdf(t[k] | param1, param2) + lognormal_lccdf(E_R[k] | param1, param2);
then for arviz I would only write:
for (k in 1:N)
log_likelihood[k] = lognormal_lpdf(t[k] | param1, param2);
Thank you in advance for your time!
I think you should use the censored likelihood.
But @avehtari or @jonah have more information than I do.
1 Like
Thank you for your quick reply - really appreciated!
Roughly speaking, it means that I need to repeat the same likelihood as I write in my model block.
Yes, by matching what you have in the model block, you are computing the actual individual terms which were added to target. As the truncation part depends on k
you need to include that, too.
1 Like
Thanks! That makes sense and solves my initial confusion
1 Like
It is nice that if something wrong in one of the model, WAIC comparison become unreliable. For example, it can become negative. In this case, calculation of WAIC could be a double check for some unfortunate typos.
Thank you two again!