Optimizing a zero-inflated model with multiple periods

Hi, I understand the optimized vectorization recommendation in the manual to speed up a zero-inflated model. However, my situation is that I need to fit the same type of zero-inflated data across multiple periods, in a HLM setting.

Is there a way to achieve the vectorization trick in my situation? Appreciate the help!

Hi, I am not sure we can help you with such a brief description. Could you share your current non-optimized Stan code? Also note that often a model is slow, because it has other problems, so vectorization might not be the best place to start if you want to improve performance. Did you have any divergences/max treedepth warnings that results in you tuning up adapt_delta or max_treedepth? Does your model reliably recover parameters from simulated data?

I will once I can code a zero-inflated model for multiple periods.