loo icon indicating copy to clipboard operation
loo copied to clipboard

use posterior::gpdfit and posterior::qgeneralized_pareto()

Open avehtari opened this issue 2 months ago • 7 comments

Since we do use posterior package elsewhere, replace gpdfit() and qgpd() with posterior::gpdfit and posterior::qgeneralized_pareto()

This will make maintenance easier. For example, there is a PR for posterior::gpdfit() to make it more robust and posterior::qgeneralized_pareto() already is more robust than qgpd()

This is related to #249, but timing is due to the fix PR for posterior::gpdfit()

avehtari avatar Oct 17 '25 17:10 avehtari

If it has been exported, then someone might be using it? Should I put it back and define it with posterior::qgeneralized_pareto()?

avehtari avatar Oct 17 '25 18:10 avehtari

At least in github only I and Juho Timonen have used loo::gpdfit, so I guess it can be removed

avehtari avatar Oct 17 '25 18:10 avehtari

Good point. Yeah you can just replace the bodies of the functions with calls to the posterior versions.

jgabry avatar Oct 17 '25 18:10 jgabry

At least in github only I and Juho Timonen have used loo::gpdfit, so I guess it can be removed

OK in that case, we can try removing it and we will find out in the reverse dependency checks whether any packages are using it

jgabry avatar Oct 17 '25 18:10 jgabry

The error now is because apparently these functions aren't exported from posterior, they're just internal functions. That would be easy to change but it would require doing a CRAN release of posterior.

jgabry avatar Oct 17 '25 19:10 jgabry

my bad, I guess this needs to wait for the next posterior release

avehtari avatar Oct 17 '25 19:10 avehtari

There is also #290 from @VisruthSK that is waiting to be merged until there is a new release of posterior

jgabry avatar Oct 17 '25 19:10 jgabry