- Can I use
baysplot::ppc_dens_overlay()for hierarchical posterior predictions from CmdStan? (see an outline description of the hierarchical model here) - If yes, how to get the data right?
The posterior predictions generated from CmdStan should be an array of dim(S, J, N), where
-
Sis the number of samples (2000 by default) -
Jis the number of entities (group) in my model -
Nis the number of calendar quarters
Q: I need to turn this ‘wide’ form into a ‘long’-form matrix of S rows and (JxN) columns (and also with a length-(JxN) vector as the group variable), right?