Positive values for elpd_loo?

Hey Stan experts!

I have fit a reinforcement learning model (rStan on Windows 10) and am trying to do some model comparison (one versus multiple learning parameters).

So far I got everything to run smoothly, and I’m also able to compare the expected log predictive densities of the two model versions using loo and loo_compare. However, I became a bit sceptical when I saw that one of the models created elpd_loo values > 0. That would mean that the expected predictive density is > 1. Now from my limited understanding of the math that should not be a problem per se since we’re talking about a density and not probabilities. Still I wanted to ask since in all examples or tutorials the elpd_loo value was always negative (rendering the LOOIC positive).

Do I have to be concerned and if so, what could be the source of the problem? I can provide code if necessary. The pareto k estimates are all below .5.

Thanks in advance!

Hi ktrutmann, and welcome to the forum!

epld_loo being positive is not a problem. From the loo-packge glossary:

elpd_loo is the Bayesian LOO estimate of the expected log pointwise predictive density (Eq 4 in VGG2017a) and is a sum of N individual pointwise log predictive densities. Probability densities can be smaller or larger than 1, and thus log predictive densities can be negative or positive. For simplicity the ELPD acronym is used also for expected log pointwise predictive probabilities for discrete models. Probabilities are always equal or less than 1, and thus log predictive probabilities are 0 or negative.

5 Likes

Man I searched up and down for that exact sentence, but I guess at the wrong places.
Thank you so much for the quick help!

2 Likes

@julianquandt thanks for pointing out the right place to find that. @ktrutmann We’re always trying to improve our documentation, so I’m curious if you have a recommendation for where we could mention this so it would be less likely to cause confusion. Should we add more links to the glossary page from the other documentation pages? Or had you seen the glossary but there’s just so much text there that it’s easy to miss something (totally understandable)? Other suggestions are definitely welcome. Thanks!

5 Likes

Hey @jonah

nah, I think this was my mistake. I was reading papers and the R help files and maybe even stumbled over the glossary but didn’t read it propperly. I don’t think there’s too much text in it.
However, in general I think it’s always good to have as many links to the glossary (or further information in general) as possible. One thing that might also be helpful is to not only mention (and link) the vignettes but also the function reference page in the starting page of the RStan documentation. I somehow completely missed it in the menu and was looking for something like it in the text. That’s probably a “dumb end user” thing, but I assume I’m not the only one who that might happen to. ;)

Thank you for the great work you are doing!
Cheers!

2 Likes