title: Is the density function of the invgamma package wrong?
body: <p>It seems like <code>invgamma::dinvgamma</code> gives a value that is both different from <a href="https://en.wikipedia.org/wiki/Inverse-gamma_distribution" rel="nofollow noreferrer">Wikipedia's</a> and other package.</p>
  
  <pre><code>&gt; shape = 1
  &gt; scale = 2
  &gt; x = 2
  &gt; invgamma::dinvgamma(x, shape = shape, scale = scale)
  [1] 0.0973501
  &gt; scale ** shape / gamma(shape) * x ** (-shape - 1) * exp(-scale / x) # Wikipedia
  [1] 0.1839397
  &gt; MCMCpack::dinvgamma(x, shape = shape, scale = scale)
  [1] 0.1839397
  </code></pre>
  
  <p>Indeed, the <code>scale</code> parameter in <code>invgamma:dinvgamma</code> should have been called <code>rate</code> instead.</p>
  
  <pre><code>&gt; invgamma::dinvgamma(2, shape = shape, rate = scale)
  [1] 0.1839397
  </code></pre>