| invgamma | R Documentation |
Density, distribution function, and random generation for the inverse Gamma distribution.
dinvgamma(x, shape, rate, scale = 1/rate, log = FALSE)
pinvgamma(q, shape, rate, scale = 1/rate, lower.tail = TRUE, log.p = FALSE)
qinvgamma(p, shape, rate, scale = 1/rate, lower.tail = TRUE, log.p = FALSE)
rinvgamma(n, shape, rate, scale = 1/rate)
x, q |
vector of quantiles, must be positive. |
shape, rate, scale |
positive parameters of corresponding gamma distribution |
log, log.p |
logical; if |
lower.tail |
logical; if |
p |
vector of probabilities |
n |
number of random values to return |
This implementation of dinvgamma, pinvgamma, and qinvgamma allows for automatic differentiation with RTMB.
If X \sim \Gamma(\alpha, \beta), then 1/X \sim \text{InvGamma}(\alpha, \beta).
dinvgamma gives the density, pinvgamma gives the distribution function, qinvgamma gives the quantile function, and rinvgamma generates random deviates.
x <- rinvgamma(1, 1, 0.5)
d <- dinvgamma(x, 1, 0.5)
p <- pinvgamma(x, 1, 0.5)
q <- qinvgamma(p, 1, 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.