I’m quite new to `stan`

and `brms`

, so I hope this question makes sense. I’m using `brms::posterior_predict`

to get the predictions for new data based on my fitted zero-inflated beta model. For each new data point I’m getting a sample of n=2000 predicted outcomes. Since all data points are coming from a certain spatial location I would like to spatially aggregate and summarise them using the sum of all predictions that are within a certain area (i.e. based on their zip code). Ideally, I would be able to calculate the 5% and 95% as well as the median for the sum of all predictions in an zip code area based on multiple predictions from `brms::posterior_predict`

. Is there a straightforward and/or recommended way to do this? (i.e. using convolution or by summing the summary statistics of each prediction?)

- Operating System: Windows 7 Professional Service Pack 1
- brms Version: 2.3.1