Conditional Posterior Distribution of nu for location-scale t distribution

In their book Bayesian Data Analysis, Gelman et al. provides a setup for a Gibbs Sampler for a $$t_{\nu}(\mu,\sigma^2)$$ distribution with $$\mu$$ and $$\sigma^2$$ unknown. The sampler is given as (p.294): \begin{align} V_i|\mu,\sigma^2,\nu,y &\sim \text{Inv-}\chi^2\left(\nu+1,\frac{\nu\sigma^2+(y_i-\mu)^2}{\nu+1}\right)\\ \mu|\sigma^2,V,\nu,y &\sim \text{N}\left({\sum_{i=1}^{n}\frac{1}{V_i}y_i}\Big/{\sum_{i=1}^{n}\frac{1}{V_i}},{1}\Big/{\sum_{i=1}^{n}\frac{1}{V_i}}\right)\\ p(\sigma^2|\mu,V,\nu,y) &\propto \text{Gamma}\left(\sigma^2\Big|\frac{n\nu}{2},\frac{\nu}{2}\sum_{i=1}^{n}\frac{1}{V_i}\right)\\ \end{align}

where $$V_i$$ are auxiliary variables, $$\mu$$ is the mean and $$\sigma^2$$ is the square of the scaling parameter.

He then says that if $$\nu$$ is itself unknown, the Gibbs sampler must be expanded to include a step for sampling from the conditional posterior distribution of $$\nu$$. My question is how and where can I find the conditional posterior distribution of $$\nu$$ for a location-scale $$t$$ distribution? I'm completely lost on how to start and am not sure how to proceed.

Assuming $$\pi(\nu)$$ is the prior distribution on $$\nu$$, independent from $$(\mu,\sigma)$$ a priori, the conditional posterior on $$\nu$$ satisfies \begin{align}\pi(\nu|\mu,\sigma,\mathbf y)&\propto \pi(\nu)\prod_{i=1}^n \frac{\Gamma((\nu+1)/2)}{\sqrt{\nu}\,\Gamma(\nu/2)}\left(1+\frac{(y_i-\mu)^2}{\nu\sigma^2}\right)^{-(\nu+1)/2}\\ &\propto \pi(\nu)\left(\frac{\Gamma((\nu+1)/2)}{\sqrt{\nu}\,\Gamma(\nu/2)}\right)^n \prod_{i=1}^n\left(1+\frac{(y_i-\mu)^2}{\nu\sigma^2}\right)^{-(\nu+1)/2}\tag{1}\end{align} which does not simplify in any standard distribution on $$\nu$$.
If one uses the completion of the $$y_i$$'s by the $$v_i$$'s, as found in Gelman et al. (p.294), then \begin{align}\pi(\nu|\mu,\sigma,\mathbf v)&\propto \pi(\nu)\prod_{i=1}^n \frac{(\nu\sigma^2)^{\nu/2}}{\Gamma(\nu/2)}{\,v_i^{-\nu/2-1}\exp\{-\nu\sigma^2}\big/2v_i\}\\ &\propto \pi(\nu)\frac{(\nu)^{n\nu/2}}{\Gamma(\nu/2)^n}{\,(v_1\cdots v_n)^{-\nu/2-1}\exp\Big\{-\nu\sigma^2}\sum_{i=1}^n1\big/2v_i\Big\} \end{align} which is close to a Gamma distribution, except for the prior and the term $$\Gamma(\nu/2)^{-n}$$. Note that Stirling's approximation returns $$\Gamma(\nu/2) \approx (\nu/2)^{\nu/2}e^{-\nu/2}/\sqrt{\nu/4\pi}$$ hence $$\frac{(\nu)^{n\nu/2}}{\Gamma(\nu/2)^n} \approx \frac{(\nu)^{n\nu/2}}{(\nu/2)^{n\nu/2}e^{-n\nu/2}}\sqrt{\nu/4\pi}^n \propto 2^{n\nu/2}e^{n\nu/2}\nu^{n/2}$$ which has a fairly explosive behaviour.
Furthermore, in the special case $$\nu$$ is restricted to be an integer, the (conditional posterior) pmf (1) can be computed up to a normalising constant and hence be simulated exactly.
• thanks for the answer. Just a few follow up questions. What prior are you assuming? Is it a uniform? Also, if restricting $\nu$ to an integer, do I use the same formula that you displayed but with restricting each draw to an integer? I hope this makes sense. Thanks!
• Any prior can be used (I forgot a $\pi(\nu)$ in the second row). If in particular this prior is supported by the integers $\mathbb N$, this formula applies as well (as a density wrt the counting measure on $\mathbb N$). Commented Dec 5, 2020 at 9:26