Monday, February 20, 2012

Hierarchical Diagram for Pseudoprior Model in Ch. 10

Chapter 10 of the book describes the use of pseudopriors in model comparison to help the model-index parameter be sampled more efficiently (with less clumpy autocorrelation). The method was discussed without a diagram to illustrate where the pseudoprior has its effect in the model structure. This blog entry provides a diagram.

The extended example in Chapter 10 examined two models of the filtration-condensation data. One model used a separate κc for each condition. The second model used a single κ0 parameter for all conditions. The program that implements the model comparison is called FilconModelCompPseudoPriorJags.R (or FilconModelCompPseudoPriorBrugs.R originally). The diagram shown above extends Figures 9.15 and 9.17 of the book, to include the two models' priors on κ. See the top of the diagram, which forks under the modelIdx into gamma distributions for κc or κ0. The main thing that you have to do, that is not shown in the diagram, is imagine how the shape of the gamma distribution changes depending on the state of the model index. This is suggested by the text beside the gamma distributions. When the model index is 1, then the left gamma distribution is actually being used to model the data, and the real prior constants are used for it. On the other hand, when the model index is 1, then the right gamma distribution is not being used to model the data, and the pseudoprior constants are used for it, to keep the κ0 value in a reasonable range. See the two variations below, that illustrate when the model index is 1 and 2, respectively: