Sorry, totally my fault, I didn’t think about the number at all…
The priors in the model really don’t fit at all, I get what I think is reasonable parameters if I fix those up a bit (also switched to measuring mass in kg, to make the numbers a bit more managable):
species_idx, species = penguins['species'].factorize(sort=True)
COORDS = {"species": species}
with pm.Model(coords=COORDS) as model_zsn:
intercept = pm.Normal("intercept", sigma=10)
species_sigma = pm.HalfNormal("species_sigma", sigma=1)
α_species = pm.ZeroSumNormal("α_species", sigma=species_sigma, dims="species")
species_id = pm.ConstantData("species_id", species_idx)
mu = intercept + α_species[species_id]
σ = pm.HalfNormal("σ", 0.5)
mass = pm.Normal("mass", mu, σ, observed=penguins["body_mass_g"] / 1000)
trace_zsn = pm.sample()
az.summary(trace_zsn, round_to=2)
It might also be a good idea to check if modeling the mass on log scale fits the data better.