Looks like what it says, you can’t sample a discrete variable using ADVI.
Your options appear to be:
- Try implementing some kind of marginalization over the missing values, maybe by taking the mean of the observed values, or by waiting for someone more experienced to chime in with a better option.
- Try to approximate the missing values using a continuous distribution with support on [0, 1] and centered on the probability parameter probW, like a LogitNormal or a Beta. This gives you something like your “belief” that this missing value is a 1. Note that in this case you now have to estimate a scale parameter for your missing values, so I don’t know if the juice is worth the squeeze. If you must have 0-1 values for down-stream calculations, perhaps you could try using a threshold, like
at.ge(W_missing_continuous, 0.5) * 1.0?