Constraining Uniform distribution range by another random variable


At this point this I think this should be easy to implement but it is not working. How can I condition the lower value of a uniform distribution using another pm variable? I am trying this, but it never starts to sample,

ranges = {}
ranges['U1'] = 4, 40
ranges['U2'] = 4, 40

with pm.Model() as model:
    u1_ = pm.Uniform('ep1', ranges['U1'][0], ranges['U1'][1])
    u2_ = pm.Uniform('ep2', u1_, ranges['U2'][1])

I am using SMC since multimodal posteriors are expected.
Any feedback is welcome.

Samples fine for me. What version of pymc and aesara are you using and what platform are you on?

Thank you for the feedback. I am on Ubuntu 16.04 LTS PyMC3 3.11.4. I am trying to replicate the effect using pm.Potential with halfNormal

Try V4, we did a lot of improvements to SMC since the version you are using.

1 Like

Thank you I will try it