Divergences with unused variables

See these comments by @aseyboldt. Priors aren’t necessarily easier to sample than posteriors via MCMC.

This example is quite interesting though. I think it’s just the half-normal; the fact that there are two independent distributions is (i think) not relevant. I guess the boundary of the half-normal isn’t easy for NUTS? This model samples fine:

import pymc as pm

with pm.Model() as model:
    mu = pm.Normal("mu", mu=0, sigma=20)
    signed_sigma = pm.Normal("signed_sigma", sigma=20)
    sigma = pm.Deterministic('sigma', pm.math.abs(signed_sigma))

    idata = pm.sample()