Description Usage Arguments Value References Examples
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.
1  | PPC_group_distribution(obj, parName = "", nDraws = 1)
 | 
obj | 
 Matrix (rows: samples, cols: parameter) or Stanfit object.  | 
parName | 
 Name of the observation-dependent (e.g. patient-dependent) parameter to consider (optional when   | 
nDraws | 
 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.'
1 2  | X <- matrix(rnorm(1e3), ncol = 10)
PPC_group_distribution(X, "", 10)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.