I want to sample from the posterior distributions in pymc3 but conditional on specific values of certain variables. I see how to sample the posteriors with sample_ppc, but it is unclear how to do this conditionally. Is there a simple way?
For example, let's say I have this model:
with pymc3.Model() as model:
mu = pymc3.Uniform('mu', -3., 3.)
std = pymc3.Uniform('std', 0., 2.)
N = pymc3.Normal('N', mu=mu, sd=std, observed=obs)
start = pymc3.find_MAP()
step = pymc3.NUTS(scaling=start)
trace = pymc3.sample(2000, step, start=start)
How can I sample from the posterior distribution of N
conditional on mu
having the value of 1.5?