Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work towards bayesplot and loo integration? #278

Open
nicholasjclark opened this issue Apr 12, 2024 · 0 comments
Open

Work towards bayesplot and loo integration? #278

nicholasjclark opened this issue Apr 12, 2024 · 0 comments

Comments

@nicholasjclark
Copy link

Hi @gavinsimpson,
Firstly, great work getting posterior_samples into such great shape. It is a shame that {mgcv} doesn't already have handy functions to simulate on the outcome scale, this functionality is badly needed. I'm not sure what your long-term plans are, but to me it seems sensible to use these capabilities to make the huge list of ppc and ppd functions from {bayesplot} available for {mgcv} and friends. I've just done this for {mvgam} and it is surprisingly easy, once you have the simulation functions already available (as always, the code in {brms} provides an excellent template).

Of course it doesn't have to stop there. With appropriate simulation functions for a wide range of families, you could incorporate a more useful loglik() function that returns posterior draws of the density. This would make {loo} functionality available, which is not only handy for model comparisons but for many other purposes (see for example my answer to this CV post). I realise you probably don't want to bring in too may dependencies and you probably have your own directions to head, so if you aren't keen on this then no big deal. But I'd be happy to lead some of it if you're willing to accept PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant