4
$\begingroup$

I know that improper priors sometimes lead to improper posteriors and that I shouldn't be doing inference with an improper posterior. But short of computing $$ \int \pi(\theta\mid x)\,\text d\theta $$ what's a principled way to check if I've accidentally chosen improper priors that led to an improper posterior? Can I do this with just my posterior samples when I don't even know the functional form of $\pi(\theta\mid x)$?

$\endgroup$
  • 2
    $\begingroup$ If the posterior is improper, you cannot get posterior samples, you cannot run a converging MCMC, &tc. Thus checking $$\int \pi(\theta) f(x|\theta) \text{d}\theta<\infty$$is the only solution! $\endgroup$ – Xi'an Apr 16 at 19:03
  • $\begingroup$ @Xi'an thank you for the comment! Is it correct then that it's completely sufficient to check for this by the usual MCMC diagnostics, and if my sampler is convergent then I don't need to worry about an improper posterior? $\endgroup$ – alfalfa Apr 16 at 19:10
  • 1
    $\begingroup$ No I do not think this is correct as I do not know of foolproof diagnostics for improper posteriors. These diagnostics only apply to proper posteriors and convergent MCMC chains. $\endgroup$ – Xi'an Apr 16 at 19:41
  • 1
    $\begingroup$ If you suspect that the posterior is flat in some direction, one way to obtain an indication of this is to do run several mcmc chains, each restricted to different subintervals (such that they converge), and then align density estimates based on these mcmc runs to obtain an estimate of the overall possibly improper posterior. I used this method in this paper, see Figure S5. $\endgroup$ – Jarle Tufto Apr 17 at 13:49
  • $\begingroup$ @JarleTufto thank you, i will look into that $\endgroup$ – alfalfa Apr 19 at 14:44
1
$\begingroup$

The fundamental issue with improper posteriors $\mu$ is that Markov chains associated with them are either transient (reaching almost surely and definitely some infinite region of the state space) or null recurrent (revisiting past places but in an infinite time). In the later case, there is a form of ergodic theorem, namely that for $g,h\in\mathcal L¹(\mu)$, $$\dfrac{\sum_{t=1}^T g(\theta^t)}{\sum_{t=1}^T h(\theta^t)}\longrightarrow\dfrac{\int g(\theta)\,\text{d}\mu)\theta)}{\int h(\theta)\,\text{d}\mu(\theta)}$$ which means that some form of stability occurs and in consequence turns detection of infinite mass difficult, especially when the improper nature of the posterior occurs near a finite boundary. This happened for instance for an ANOVA model analysed in one of the first Gibbs sampling papers in 1990, namely that the Gibbs sampler did not produce detectable signals of the issue...

Here is a toy example based on the improper target $\mu(\theta)=e^{-\theta}/\theta$ over $\Bbb R^*_+$:

   targ=function(x) ifelse(x>0,1/x/exp(x),0)
   T=1e6
   mark=rep(1,T)
   for (t in 2:T){
    prop=rnorm(1,mark[t-1],.1)
    mark[t]=ifelse(runif(1)<targ(prop)/targ(mark[t-1]),prop,mark[t-1])}

with an output that looks not that great but still moving around:

enter image description here

$\endgroup$
  • 1
    $\begingroup$ thank you, this has proved to be a more nuanced issue than i first guessed $\endgroup$ – alfalfa Apr 22 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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