Tricky Bayesian #rstats#brms methods question! I'm building a predictive model for a strangely-distributed outcome—it's a count with a bunch of 1s, a bunch of 32s (the max) and some numbers in between. How do you model this weird thing?! (reprex here: gist.github.com/andrewheiss/33…)
- I can subtract 1 from the outcome and use zero-inflated poisson to pick up the excess 1s, but there's no such thing as "1-and-32-inflated poisson" like zero-one-inflated beta, and the pp_check is awful
- I can use a mixture of two poisson models, but pp_check is bad+ESS bad
- I can collapse all the 2–31 counts into a category and just do ordered logit with 1, 2–31, and 32 as categories, but collapsing like that feels icky
idk :(
Treating the outcome as a proportion (it's censored at 32 because it's actually a count of provinces each row works in and there are only 32 provinces in the country so 100% = 32) means I can use zero-one-inflated beta regression without any custom families and it works!
• • •
Missing some Tweet in this thread? You can try to
force a refresh
And in more @quarto_pub#rstats news, I just finished remaking one of my complex course websites as a Quarto website and IT IS SO COOL. Configuring the site was quick and easy. The part that took the longest was customizing some of the template partials evalf22.classes.andrewheiss.com
Even cooler is that I build the whole thing with {targets} with some complex stuff, like automatically zipping homework folders for easy downloading, rendering xaringan slides and converting them to PDF, generating data, and uploading to my server, all without Make! #rstats