A question on "stan cannot deal with discrete parameters"

I should’ve qualified that the two cases that come up regularly and Stan has problems with are:

  • missing count data

  • feature selection priors

The latter is because of combinatorics, the former because we can’t do the marginalization exactly. BUGS/JAGS can deal with the former, but the latter are very challenging for anyone. If you try to run, make sure you run multiple times and get the same zeroes. Then it’s hard to figure out what posteriors are, because even with spike-and-slab priors, the posterior’s unlikely to be truly zero unless the indicator function is very very near zero and you luck out with underflow.

1 Like