Imputation of a 3 category covariate to model a binary outcome

Diego,

At first glance, it looks like you haven’t specified how day and late are predictors of the categorical covariate in cases where the categorical covariate are actually observed. For cases where cov_cat is observed you need a line like:

if (cov_cat_miss[i] == 0) {
  y[i] ~ bernoulli_logit(a0+
                           beta_bp*cov_cat_1[i]+
                           beta_m*cov_cat_3[i]);
cov_cat[i] ~ categorical_logit( p );
}

As is, it looks like there’s no data informing linear models p2 and p3. I accidentally omitted this step from my example in Log_mix for missing categorical data. See my edit to that post for an updated example script. I didn’t catch the error before because I assigned uniform probabilities to each category, so it didn’t matter that they weren’t being informed by data so long as they had reasonable priors.