Plot the distribution density of parameters within a same group from a single/multiple draw of the posterior distribution. In the case of a hierarchical model, we might look at the distribution of patient parameter and compare it to the prior for the population distribution.
PPC_group_distribution(obj, parName = "", nDraws = 1)
Matrix (rows: samples, cols: parameter) or Stanfit object.
Name of the observation-dependent (e.g. patient-dependent) parameter to consider (optional when obj
is a matrix).
Number of draws to plot
Ggplot of the distribution
A. Gelman, J. B. B. Carlin, H. S. S. Stern, and D. B. B. Rubin, Bayesian Data Analysis (Chapter 6), Third Edition, 2014.