This example comes from the stan user guide (4.3 Censored data | Stan User’s Guide). And it mentions that “the imputed censored data affects the location and scale parameters through the last sampling statement in the model”. But how can the imputed data y_cens
affect the parameter estimates, mu
and sigma
?
data {
int<lower=0> N_obs;
int<lower=0> N_cens;
array[N_obs] real y_obs;
real<lower=max(y_obs)> U;
}
parameters {
array[N_cens] real<lower=U> y_cens;
real mu;
real<lower=0> sigma;
}
model {
y_obs ~ normal(mu, sigma);
y_cens ~ normal(mu, sigma); // posterior estimates of mu and sigma are different after removing this statement
}