After fitting the model the R2 for test data is negative

I’m with you on tut-tutting not doing proper Bayesian posterior predictive inference for quantities of interest.

It’s even more confusing when you need to estimate a log expected probability rather than an expected log probability. For the former, you have to be careful of precision and use the log-sum-exp trick. For the latter, it’s the issue you brought up about Jensen’s inequality. This is all pretty straightforward applications of a few common tricks once you get used to it, but I found it really really confusing to learn.

2 Likes