Hi all,
My team has been using the hBayesDM package for a few different tasks (two-stage decision making, Kirby questionnaire, Go-NoGo, and probabilistic reversal learning), and we are looking to perform posterior predictive checks (PPC) on our models. Our goals with the PPC are twofold - 1) validate model fit in a way that will appease any future reviewers, and 2) compare the fit across multiple models to determine which fits the data best - either graphically or by producing a numeric output. While we are aware of the hBayesDM functionality to produce LOOIC values for model comparison, the hierarchical models we use produce errors of Pareto-K values, which has been advised to not be of terrible concern for overall model fit (as they are common in hierarchical models, https://groups.google.com/g/hbayesdm-users/c/RXUTGeAs0x4/m/RMf4ZXwoAAAJ) but the pareto-k warning may indicate that LOO techniques are unreliable in the present data (https://groups.google.com/g/hbayesdm-users/c/9jxD94k6pPc/m/xpkNYwFFCgAJ). As such, the LOOIC procedure may not contribute accurate results. The field generally seems to favor PPC for model validation in general, but this secondary use for model comparison is valuable due to the LOOIC interpretation limitations we're up against.
To prepare for a PPC, we generate the predicted values using the "inc_postpred()" argument in the model definition. We'd like to use these values, compared to the actual values, to perform a PPC towards a graphical and/or numerical output. I'm wondering if there is existing hBayesDM functionality to do this in R? I found some helpful documentation for PPC's using the "bayesplot" and "rstanarm" packages (R 4.2.2), but these produce errors when a model object is fed into a function due to incompatibility with an hBayesDM object - they are designed for easy use specifically with stan objects. Similarly, I found some guidance from this group for PPC's that again point at the "rstan" package (socialRL/code/reinforcement_learning_HBA.R at master · lei-zhang/socialRL). Seeing as the `ts_par#()`, `dd_hyperbolic()`, `gng_m#()`, and `prl_rp()` functions produce an hBayesDM model object, these helpful functions designed for compatibility with stan objects are not easily useful here.
The best option that might exist is a PPC framework that is friendly to hBayesDM objects - does anything like that exist? Alternatively, we can extract the real and predicted values from the hBayesDM object to manually fit them into bayesplot functionality. Or, apply a different statistical process to the extracted predicted and real values.
In sum, we're curious if there is existing functionality in place to support PPC using an hBayesDM object, or if there is any advisement from the toolbox creators on how a PPC should be conducted (e.g. an existing process, suggested statistical approach, etc.) using the data output from this toolbox.
Many thanks,
Morgan
Please let me know if you need any further clarification.