Skip to main content
edited tags
Link
mpiktas
  • 35.4k
  • 6
  • 89
  • 145
Tweeted twitter.com/#!/StackStats/status/97102668073418753
Source Link
N F
  • 828
  • 5
  • 11

How to sample from $c^a d^{a-1} / \Gamma(a)$?

I want to sample according to a density $$ f(a) \propto \frac{c^a d^{a-1}}{\Gamma(a)} 1_{(1,\infty)}(a) $$ where $c$ and $d$ are strictly positive. (Motivation: This could be useful for Gibbs sampling when the shape parameter of a Gamma density has a uniform prior.)

Does anyone know how to sample from this density easily? Maybe it is standard and just something I don't know about?

I can think of a stupid rejection sampliing algorithm that will more or less work (find the mode $a^*$ of $f$, sample $(a,u)$ from uniform in a big box $[0,10a^*]\times [0,f(a^*)]$ and reject if $u>f(a)$), but (i) it is not at all efficient and (ii) $f(a^*)$ will be too big for a computer to handle easily for even moderately large $c$ and $d$. (Note that the mode for large $c$ and $d$ is approximately at $a=cd$.)

Thanks in advance for any help!