| invchisq | R Documentation |
Density, distribution function, quantile function, and random generation for the inverse Chi-squared distribution.
dinvchisq(x, df, scale = 1/df, log = FALSE)
pinvchisq(q, df, scale = 1/df, lower.tail = TRUE, log.p = FALSE)
qinvchisq(p, df, scale = 1/df, lower.tail = TRUE, log.p = FALSE)
rinvchisq(n, df, scale = 1/df)
x, q |
vector of quantiles, must be positive. |
df |
degrees of freedom ( |
scale |
optional positive scale parameter. Default value of |
log, log.p |
logical; if |
lower.tail |
logical; if |
p |
vector of probabilities |
n |
number of random values to return |
If X \sim \text{Chisq}(\nu), then 1/X \sim \text{invChisq}(\nu).
The inverse Chi-squared distribution with \nu degrees of freedom has
density
f(x) = \frac{(\nu/2)^{\nu/2}}{\Gamma(\nu/2)} x^{-(\nu/2+1)} \exp(-\nu/(2x)), \quad x>0.
This implementation of dinvchisq, pinvchisq, and qinvchisq allows for automatic differentiation with RTMB.
dinvchisq gives the density, pinvchisq gives the distribution function,
qinvchisq gives the quantile function, and rinvchisq generates random deviates.
x <- rinvchisq(1, df = 5)
d <- dinvchisq(x, df = 5)
p <- pinvchisq(x, df = 5)
q <- qinvchisq(p, df = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.