Missing categorical outcome data

Dear forum,

I am trying to build a simple bernoulli_logit model for estimating model parameters with missing data, including missing categorical outcome data (choice). Since it is impossible to define missing data as int and since bernoulli_logit MUST have int as an outcome, my missing data formulation fails.
Is there a way around it?

Thanks!

I’d define a vector as parameter as follow:

vector<lower=0, upper=1>[N] Ymiss;

and would treat the missing values Ymiss as a fractional logit model. Let’s say

y ~ bernoulli_logit(eta);

That can be written as:

target += y * log_inv_logit(eta) + (1-y) * log1m_inv_logit(eta);

Ymiss analog.

2 Likes

Sorry for the delay. This is an elegant solution. Thank you!