Please also provide the following information in addition to your question:
Operating System: Windows 10
brms Version: 2.7.3
Hello, I am relatively new to Stan and brms. I fiited a Dirichlet model and I tried to use the pp_check function on my model fit but I get the error:
Error in validate_y(y) : ‘y’ must be a vector or 1D array.
I assume this is because I have multiple response variables. However I do not know how to indicate to the function to check a specific response variable.
Is there a reason for why you’re not modeling it as an ordinal regression in brms? If you then have Dirichletpriors on any predictors (that are ordered categorical), and which you try to estimate, that should work. https://psyarxiv.com/x8swp/ https://psyarxiv.com/9qkhj/
If you are willing to do mild preprocessing yourself, the ppc_bars and ppc_bars_grouped should work for you (will easily show the observed counts for each category vs. the predictions), see https://mc-stan.org/bayesplot/reference/PPC-discrete.html for the format you need to get your data and posterior draws into.
@martinmodrak yes thanks I’l fiddle around and should be able to do it with minimal work, would in general be nice to have the full diagniostic tools available for the compositional data.
@torkar I’m not sure an ordinal model works for me, as my predictors are not categorical, rather it is a compositional response variable , so continuous shares of various categories being predicted,