Getting prior when prior predictive results are given

I have a problem where expert input is given which can be viewed as reflecting the prior-predictive distribution. I need to transform this information into an estimate of the prior. Is this process facilitated in some way in PYMC? Right now, all I can think of is a laborious trial-and-error approach.

Thanks for helping.

Some options:

Thanks for the quick answer! I will look into this.

Rather than trying to estimate a parametric prior, you can take draws from the prior predictive and treat that as data in the model. They act like a prior this way. You’ll have to decide how many draws to take—the more you take, the stronger the prior.

Here’s an example for a beta-binomial with integer parameters. Conjugate priors are always in the exponential family and can always be expressed in terms of prior data (though it may be fractional).

y \sim \textrm{binomial}(N, \theta)

and a prior

\theta \sim \textrm{beta}(a, b)

for integers a, b > 0, then you get an equivalent posterior if you take a uniform prior

\theta \sim \textrm{beta}(1, 1)

and take

y \sim \textrm{binomial}(N, \theta)

and

a - 1 \sim \textrm{binomial}(a + b - 2, \theta).

The algebra’s tedious but straightforward to verify that if you just multiply the prior and likelihood in the first case and prior and two likelihoods in the second case that they work out to the same result. It also helps illustrate why the exponential forms are so useful.