a + b - hierarchy without interactions, a, b - zerosum
a*b - hierarchy with interactions, a, b - zerosum, a_b - interaction effect with zerosum
(1 | a) + b - ??? should it be even considered?
API
with pm.Model(coords=dict(groups=range(10), stages=range(3))):
mean = pm.Normal("mu")
sigma = pm.Exponential("sigma")
z = zerosum_hierarchy("z ~ groups + stages", importance=dict(groups=10), named=False)
group_param = mean + z * sigma
Usecases
API