I’m a little confused by something in the missing data documentation.

In Section 3.1, the missing data is being generated as parameters. Section 3.5 is similar in many ways to Section 3.1, but extends it to a multivariate case where some of each variable is missing. However, Section 3.5 does not seem to use the same approach as Section 3.1 in terms of generating missing data as parameters. If Section 3.5 were set up the same as Section 3.1, then the initial for loop presented would need to be adjusted to something like below

```
for (n in 1:N) {
if (y_observed[n, 1] && y_observed[n, 2]) {
y[n] ~ multi_normal(mu, Sigma);
} else if (y_observed[n, 1]) {
y[n, 1] ~ normal(mu[1], sqrt(Sigma[1, 1]));
y[n, 2] ~ normal(mu_2_given_1 + B_2_given_1 * y[n, 1], sigma_2_given_1));
} else if (y_observed[n, 2]) {
y[n, 1] ~ normal(mu_1_given_2 + B_1_given_2 * y[n, 2], sigma_1_given_2));
y[n, 2] ~ normal(mu[2], sqrt(Sigma[2, 2]));
}
}
```

where mu_2_given_1, B_2_given_1, sigma_2_given1 and such as given by the conditional multivariate normal distribution.

This would generate the missing y conditional on the available y. It seems as if this approach is not taken. Footnote two in Section 3.5 mentions that in a multivariate regression problem with missing predictors, then the missing data would need to be generated as parameters, but I’m still not entirely sure why that is not needed here. Section 3.1 doesn’t have any predictors and still represents the left-hand side missing data as parameters.

Can anyone explain this to me?