Integer parameters

Hi everyone,

I know that Stan does not support integer parameters. But is there any way we can round the problem of integer parameters? Any suggestion? I read chapter 10 and 12 of the manual.

Thank you,
Elaheh

The workarounds depend on what you are trying to do. What are you trying to model?

I have an equaton like this:
K=M+TK
K is my known matrix (data);
Parameters are matrices M and T that M is a matrix with elements <lower=0,upper=1> and each column must sum up to one and T is a matrix with integer elements 0 and 1. Thank you.

The only way that you could make this work in Stan (assuming that M can have real values) is to marginalize over all possible configurations for T. This would lead to having a simplex over all possible 2^{n^{2}} matrix configurations which is likely to strain Stan’s capabilities.

Perhaps the bigger issue is that the posterior over this mixture of configurations is likely to be multimodal as there will be many configurations consistent with the data, and Stan will have trouble jumping between and exploring all of these modes. The issues arise in other problems where we have to marginalize over many discrete degrees of freedom, such as latent Dirichlet allocation models.

1 Like

Thank you.