Target with missing values


#1

Hi all,

In the manual 2.17.0, page 180, section 11.1. Missing Data, there is a code:

data {
int<lower=0> N_obs;
int<lower=0> N_mis;
real y_obs[N_obs];
}
parameters {
real mu;
real<lower=0> sigma;
real y_mis[N_mis];
}
model {
y_obs ~ normal(mu, sigma);
y_mis ~ normal(mu, sigma);
}

What is the role of y_mis ~ normal(mu, sigma);? I am thinking that statement is just a prior for y_mis but it does not contribute to the likelihood (I mean not the posterior density).

So what happens conceptually if I remove that line from the Stan code?

Thanks for reading my question!

Trung Dung.