Thanks, this is a nice workaround.
In this simple example, the gamma distribution seems to work, though it is probably not the best choice. In more complicated models, the choice of the distribution for the induced prior might be quite tricky. I was wondering it is possible to do something with Gaussian processes, like discussed here.
One thing I noticed is that the distributions that result from your code don’t reproduce the results in the paper. I was wondering if we shouldn’t be doing log(alpha) instead of alpha. That seems to work. The last line of the model code would then be:
target += log(alpha) * uniform_lpdf(Z |0,5) + log(1-alpha)*gamma_lpdf(Z | parms[1], parms[2]);
Does that make sense?