Dear all,
I am a bit confused with the manual:
For the left-censored data the CDF (
normal_lcdf) has to be used instead of complementary CDF. If the censoring point variable (L) is unknown, its declaration should be moved from the data to the parameters block.
data {
int<lower=0> N_obs;
int<lower=0> N_cens;
array[N_obs] real y_obs;
}
parameters {
real<upper=min(y_obs)> L;
real mu;
real<lower=0> sigma;
}
model {
L ~ normal(mu, sigma);
y_obs ~ normal(mu, sigma);
target += N_cens * normal_lcdf(L | mu, sigma);
}
But why does L also follow the normal prior with the mean mu and SD sigma? In my opinion, it should be something like min(y_obs) - L ~ exponential(0.1)