Sergei
|
Dear Konrad,
I have looked into how to resolve this discretization issue; unfortunately, there is not much that the current implementation lets you do - it discretizes the mixture, and because the gradient of the beta gets very steep around '1', the double precision is insufficient to resolve discretization intervals - one of them (incorrectly) spills over one, and you get silly values for the beta part. Note that if you remove the omega part, the beta distribution with same p and q will be discretized correctly, because of the [0,1] support coded into the definition of the category variable.
I'll actually add a new way to define mixtures (e.g. category mixed = (cat1,p1,cat2,p2,...,catN,(p_n)), which will allow to specify "hard" bounds on the components and avoid round-off error related issues.
In the meantime, I suggest inspecting the output for oddities like the one you found - this is a fairly rare case, and it suggests that beta+w is a poor choice to model the distribution of rates in your case.
Thanks for bringing this to my attention and stay tuned.
Cheers, Sergei
|