2
$\begingroup$

Suppose that $\theta = (\theta_1,\theta_2) \in{\mathbb R}^2$ are the parameters of a model, and that I can obtain a MCMC sample from the posterior distribution of $\theta \mid {\bf x}$.

Using the MCMC sample, how can I obtain the conditional posterior distribution

$$\theta_2 \mid \theta_1, {\bf x}\,?$$

$\endgroup$
9
  • $\begingroup$ mmm if $\theta_1$ is discrete... good luck with estimating the distribution from old samples, if it's discrete, you can just consider only the sample with that value of $\theta_1$ $\endgroup$
    – Alberto
    Commented Jul 15, 2022 at 14:36
  • $\begingroup$ @AlbertoSinigaglia Good point. Both parameters are continuous. $\endgroup$
    – Condo
    Commented Jul 15, 2022 at 15:02
  • $\begingroup$ Do you have a particular value of $\theta_1$ in mind, or do you want the conditional posterior to be calculated for a wide range of values? $\endgroup$
    – jbowman
    Commented Jul 15, 2022 at 15:16
  • 1
    $\begingroup$ No, I mean the proposal distribution. If the proposal has either of those two structures, it becomes easy to simply fix $\theta_1$ and generate only proposals for $\theta_2$. Since this is now a one-dimensional problem, you should be able to get a good chain with a lot fewer iterations than in the two-dimensional case, which in turn makes it possible to do this for quite a few different values of $\theta_1$. There are other approaches... $\endgroup$
    – jbowman
    Commented Jul 15, 2022 at 18:08
  • 1
    $\begingroup$ @Xi'an I could accept that as an answer if you want to post it as such. $\endgroup$
    – Condo
    Commented Jul 16, 2022 at 9:23

1 Answer 1

1
$\begingroup$

If one is using a Gibbs sampler, which is a specific type of MCMC algorithm, the conditional distributions of $θ_1$ given $θ_2,x$ and of $θ_2$ given $θ_1,\mathbf x$ are a requirement for running the algorithm. Hence $\pi( θ_2|θ^0_1,\mathbf x)$ is available as a generative model, if not necessarily in closed form.

Otherwise, in the general case, a sample from $$\pi(\theta_1,\theta_2|\mathbf x)\propto p(\mathbf x|θ_1,θ_2)π(θ_1,θ_2)$$ does not provide direct information about $\pi( θ_2|θ^0_1,\mathbf x)$, except by using a non-parametric estimator of the conditional density. Except for special cases, one need run a new MCMC algorithm with target $$\pi( θ_2|θ^0_1,\mathbf x)\propto p(\mathbf x|θ^0_1,θ_2)π(θ^0_1,θ_2)$$where $θ^0_1$ is the value of $θ_1$ one wants to condition upon.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.