ValueError: Incompatible shapes for broadcasting: shapes=[(2,), (5,)]

If you’re expecting each of the coefficients within a treatment group to be independent, then you should add another plate statement indicating that.

with numpyro.plate('Treatments', 2 , dim=-2):
   with numpyro.plate('coefficients', 5, dim=-1):
      numpyro.sample('Beta_CpGs', dist.Normal(0, 1))      
1 Like