diff --git a/BPA/Ch.10/js_ms.stan b/BPA/Ch.10/js_ms.stan index a5963ecc..86a9f902 100644 --- a/BPA/Ch.10/js_ms.stan +++ b/BPA/Ch.10/js_ms.stan @@ -121,6 +121,8 @@ generated quantities { array[M, n_occasions] int z; // Latent state // Generate z[] + // This code generates the posterior predictive distribution + // unconditioned on the observation for (i in 1 : M) { z[i, 1] = 1; for (t in 2 : n_occasions) { diff --git a/BPA/Ch.10/js_rest_occ.stan b/BPA/Ch.10/js_rest_occ.stan index 1cacf650..f5d624c2 100644 --- a/BPA/Ch.10/js_rest_occ.stan +++ b/BPA/Ch.10/js_rest_occ.stan @@ -212,6 +212,8 @@ generated quantities { array[M, n_occasions] int z; // Latent state // Generate z[] + // This code generates the posterior predictive distribution + // unconditioned on the observation for (i in 1 : M) { int q = 1; real mu2; diff --git a/BPA/Ch.10/js_super.stan b/BPA/Ch.10/js_super.stan index 7b731058..013d538f 100644 --- a/BPA/Ch.10/js_super.stan +++ b/BPA/Ch.10/js_super.stan @@ -215,6 +215,8 @@ generated quantities { array[M, n_occasions] int z; // Deflated latent state // Generate w[] and z[] + // This code generates the posterior predictive distribution + // unconditioned on the observation for (i in 1 : M) { int q = 1; if (bernoulli_rng(psi)) { diff --git a/BPA/Ch.10/js_super_indran.stan b/BPA/Ch.10/js_super_indran.stan index 0af7f9eb..2ac5b1b5 100644 --- a/BPA/Ch.10/js_super_indran.stan +++ b/BPA/Ch.10/js_super_indran.stan @@ -226,6 +226,8 @@ generated quantities { sigma2 = square(sigma); // Generate w[] and z[] + // This code generates the posterior predictive distribution + // unconditioned on the observation for (i in 1 : M) { int q = 1; if (bernoulli_rng(psi)) { diff --git a/BPA/Ch.10/js_tempran.stan b/BPA/Ch.10/js_tempran.stan index 5c39f141..07abf3d4 100644 --- a/BPA/Ch.10/js_tempran.stan +++ b/BPA/Ch.10/js_tempran.stan @@ -223,6 +223,8 @@ generated quantities { array[M, n_occasions] int z; // Latent state // Generate z[] + // This code generates the posterior predictive distribution + // unconditioned on the observation for (i in 1 : M) { int q = 1; real mu2;