Help with model fitting?

Howdy!
Just as you use histograms to visualize the data, you could use histograms to visualize your posterior predictive distribution. So, to start with, try using the pp_check() function with type='hist'. Note, that you may need to adjust the binwidth in the histogram. Since you are using a zero-inflated Poisson, you might also want to check the proportion of zeros. You might also use type='bars' or bars_grouped. In any case, you don’t want to use a density plot on discrete spaces.

pp_check(m_b2_zip, type="hist")

prop_zero <- function(Patch_count) mean(Patch_count == 0)
prop_zero_check <- pp_check(m_b2_zip, type = "stat", stat = "prop_zero")

pp_check(m_b2_zip, type="bars")

Once you have a more appropriate visualization, then you can better check the model.

Note - if you don’t mind coding in base R, even better plots, in my opinion, are like those that Michael Betancourt does in his case studies, similar to the code I used to make the plot in this post Improving PPC Fit in MELS model (brms) when using Multimodal Data - #5 by jd_c . Betancourt has some functions to do this type of plot here GitHub - betanalpha/mcmc_visualization_tools: Markov Chain Monte Carlo Visualization Tools but I personally haven’t had a chance yet to use all of them for plotting purposes.