#statstab #496 Posterior predictive checks {performance}
Thoughts: Idk why more frequentist don't use ppc for their models. I can diagnose so many issues visually this way.
#error #posterior #ppc #modelfit #diagnostics #model #r #rstats #easystats
https://easystats.github.io/performance/reference/check_predictions.html

Posterior predictive checks — check_predictions
Posterior predictive checks mean "simulating replicated data
under the fitted model and then comparing these to the observed data"
(Gelman and Hill, 2007, p. 158). Posterior predictive checks
can be used to "look for systematic discrepancies between real and
simulated data" (Gelman et al. 2014, p. 169).
performance provides posterior predictive check methods for a variety
of frequentist models (e.g., lm, merMod, glmmTMB, ...). For Bayesian
models, the model is passed to bayesplot::pp_check().
If check_predictions() doesn't work as expected, try setting
verbose = TRUE to get hints about possible problems.
#statstab #464 Plotting p-check interaction {brms}
Thoughts: Annoyingly #brms doesn't natively allow plotting for interactions (that I know of). The forum has a solution.
#ppc #posterior #bayesian #modelfit #diagnostic #rstats #r #stan
https://discourse.mc-stan.org/t/plotting-pp-check-interactions/31936

Plotting pp_check interactions
I am trying to model ordinal data with an interaction of two predictors. However, I have issues with plotting interactions and individual data with the BRMS functions. My model is of the type rating ~ category*distortion+ (1|id) I can use this type of code: pp_check(mcatxdistRDpCexp, type = “bars_grouped”, group = “category”, , ndraws = 500, prob = 0.95) pp_check(mcatxdistRDpCexp, type = “bars_grouped”, group = “distortion”, , ndraws = 500, prob = 0.95) which returns these two plots: ...
The Stan Forums#statstab #264 When estimating a treatment effect with a cluster design, you need to include varying slopes, even if the fit gives warning messages
Thoughts: Warnings are scary ⚠️ Bad model are scarier 👹
#lmer #modelfit #mixedeffects #r #randomslopes
https://statmodeling.stat.columbia.edu/2025/01/23/slopes/