loo icon indicating copy to clipboard operation
loo copied to clipboard

Add R2

Open sims1253 opened this issue 3 years ago • 6 comments

It would be nice if the loo objects weren't hardcoded to use elpd. For a study I wanted to include rmse and R2 and had to build fake loo objects in order to use the loo_compare functionality. Code is here.

sims1253 avatar May 10 '22 08:05 sims1253

I had missed this issue Thanks for the code! PRs #202 and #203 are adding more utilities/losses, but we still need to add options for loo_compare to know which utility/loss to use brms part of the code needs to go to brms package

avehtari avatar Sep 22 '22 07:09 avehtari

@sims1253 do you need something else than what is in the PRs mentioned above, or can we close this issue?

avehtari avatar Mar 24 '23 12:03 avehtari

We do have rmse, but we're still missing R2 (which is available in brms and rstanarm, but not as plain loo package version)

avehtari avatar Nov 29 '23 17:11 avehtari

...which is available in brms

At least the brms version does not use psis, which is why I wrote the version from my pr.

sims1253 avatar Nov 29 '23 20:11 sims1253

brms loo_R2 does use psis based on the code https://github.com/paul-buerkner/brms/blob/d1a050803670f4f4647324ce9a84780591a40692/R/loo_predict.R#L202

avehtari avatar Nov 30 '23 07:11 avehtari

True. Sorry, I'm currently on vacation and only have my phone and only found the Bayes r2 function. Maybe it was about the pointwise estimate for the SE then that we built the new version. I don't quite remember to be honest.

sims1253 avatar Nov 30 '23 09:11 sims1253