1
$\begingroup$

I have a question concerning calculating the Hastings ratio in a specific case (multinomial proposal distribution).

I consider a discrete vector $M$ with integer values that sum up to some number $N$. In each step of the Metropolis-Hastings algorithm I need to propose a new value for $N$ and a new value of $M$.

Let's denote $q(x \mid y)$ as the proposal distribution, i.e., the conditional probability of proposing a new state $x$ given the previous value was equal to $y$.

We propose a new value $N^*$ according to:

$$ q_1\left(N^*\mid N^{\textrm{prev}} \right) \stackrel{d}{=} \lfloor T \rfloor, \textrm{ where } T \sim tNorm(N^{\textrm{prev}}, \sigma). $$ For proposing a new value of $M$, we introduce: $$ q_2\left( M^* \mid N^{*}, M^{\textrm{prev}} \right) \sim Multinomial \left( N^*,\frac{ M^{\textrm{prev}} + s}{ \sum \limits_{i} M^{\textrm{prev},\;i} + s} \right) $$ where $s$ is a realisation of a random variable $$ S \sim N(0, \sigma) $$ and introduces an additional noise.

To perform a Metropolis-Hastings accept-reject step, we need to calculate the acceptance probability: $$ r = \min \left(1, \frac{f\left( x^* \right) q\left( x^{\textrm{prev}} \mid x^* \right)}{f\left( x^{\textrm{prev}}\right) q\left( x^* \mid x^{\textrm{prev}}\right)} \right) $$

where $x = [M,N]$.

$$ \frac{q\left( x^{\textrm{prev}} \mid x^* \right)}{q\left( x^* \mid x^{\textrm{prev}}\right)} = \frac{q_1( N^{\textrm{prev}}\mid N^{*} ) \;\; q_2\left( M^{\textrm{prev}}\mid N^{\textrm{prev}}, \frac{ M^{*} + s}{ \sum \limits_{i} (M^{*,i} + s)} \right)}{ q_1( N^{*}\mid N^{\textrm{prev}} ) \;\; q_2 \left( M^{*}\mid N^{*}, \frac{ M^{\textrm{prev}} + s}{ \sum \limits_{i} (M^{\textrm{prev},i} + s)} \right) } = $$ $$ = \frac{\text{dabsNorm}(N^{\textrm{prev}} \mid N^*, \sigma) }{\text{dabsNorm}(N^* \mid N^{\textrm{prev}}, \sigma)} \frac{\text{dmultinom} \left( M^{\textrm{prev}}\mid N^{\textrm{prev}}, \frac{ M^{*} + s}{ \sum \limits_{i} (M^{*,t} + s)} \right)} {\text{dmultinom} \left( M^* \mid N^*, \frac{ M^{\textrm{prev}} + s}{ \sum \limits_i (M^{\textrm{prev},i} + s)}\right)}, $$ where $\text{dabsNorm}$ denotes density of absolute value of the floor of a random variable following the normal distribution and $\text{dmultinom}$ density of a random variable following the multinomial distribution.

Is the above calculation correct?~

Edit 1: (based on the first comment) I was missing randomness coming from $S$. Multinomial distribution should be integrated with respect to s, or at least $s^*$ and $s^\textrm{prev}$ should appear:

$$ \frac{q\left( x^{\textrm{prev}} \mid x^* \right)}{q\left( x^* \mid x^{\textrm{prev}}\right)} = \frac{q_1( N^{\textrm{prev}}\mid N^{*} ) \;\; q_2\left( M^{\textrm{prev}}\mid N^{\textrm{prev}}, \frac{ M^{*} + s^*}{ \sum \limits_{i} (M^{*,i} + s^*)} \right)}{ q_1( N^{*}\mid N^{\textrm{prev}} ) \;\; q_2 \left( M^{*}\mid N^{*}, \frac{ M^{\textrm{prev}} + s^{\textrm{prev}}}{ \sum \limits_{i} (M^{\textrm{prev},i} + s^{\textrm{prev}})} \right) } = $$ $$ = \frac{\text{dabsNorm}(N^{\textrm{prev}} \mid N^*, \sigma) }{\text{dabsNorm}(N^* \mid N^{\textrm{prev}}, \sigma)} \frac{\text{dmultinom} \left( M^{\textrm{prev}}\mid N^{\textrm{prev}}, \frac{ M^{*} + s^*}{ \sum \limits_{i} (M^{*,t} + s^*)} \right)} {\text{dmultinom} \left( M^* \mid N^*, \frac{ M^{\textrm{prev}} + s^{\textrm{prev}}}{ \sum \limits_i (M^{\textrm{prev},i} + s^{\textrm{prev}})}\right)}. $$

$\endgroup$
2
  • 1
    $\begingroup$ You are missing the randomness associated with the generation of $s$: the multinomial density should be integrated wrt $s$, or at the very least, $s^*$ and $s^\text{prev}$ should appear in denominator and numerator. $\endgroup$
    – Xi'an
    Commented Jul 30, 2022 at 8:36
  • $\begingroup$ Thank you very much! $\endgroup$ Commented Jul 30, 2022 at 11:03

1 Answer 1

1
$\begingroup$

The ratio of proposal densities$$\dfrac{\text{dabsNorm}(N^{\textrm{prev}} \mid N^*, \sigma) }{\text{dabsNorm}(N^* \mid N^{\textrm{prev}}, \sigma)}\times \dfrac{\text{dmultinom} \left( M^{\textrm{prev}}\mid N^{\textrm{prev}}, \frac{ M^{*} + s^*}{ \sum \limits_{i} (M^{*,t} + s^*)} \right)} {\text{dmultinom} \left( M^* \mid N^*, \frac{ M^{\textrm{prev}} + s^{\textrm{prev}}}{ \sum \limits_i (M^{\textrm{prev},i} + s^{\textrm{prev}})}\right)}$$should be $$\dfrac{\text{dabsNorm}(N^{\textrm{prev}} \mid N^*, \sigma) }{\text{dabsNorm}(N^* \mid N^{\textrm{prev}}, \sigma)}\times \dfrac{\text{dmultinom} \left( M^{\textrm{prev}}\mid N^{\textrm{prev}}, \frac{ M^{*} + s^{\textrm{prev}}}{ \sum \limits_{i} (M^{*,t} + s^{\textrm{prev}})} \right)} {\text{dmultinom} \left( M^* \mid N^*, \frac{ M^{\textrm{prev}} + s^{*}}{ \sum \limits_i (M^{\textrm{prev},i} +s^{*} )}\right)}$$ and is justified as being a proper Metropolis-Hastings ratio by including the $s$'s within the Markov chain, that is, by setting $$x=(N,M,s)$$ and by creating a pseudo-target on $s$ that is the $$S∼N(0,σ)$$ distribution used in the proposal. (Hence its density cancels out in the overall Metropolis-Hastings ratio, being found in both target and proposal.)

$\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.