| density_inverse_gamma | R Documentation |
Density, cumulative distribution function and random generation for inverse-gamma distribution.
density_inverse_gamma(shape, scale, x)
cdf_inverse_gamma(shape, scale, x)
random_inverse_gamma(shape, scale, n)
shape, scale |
shape and scale parameters. |
x |
vector of quantiles. |
n |
number of observations. |
numeric vector
Functions density_XXX and cdf_XXX return numeric vectors of same length as x.
Function random_XXX returns a numeric vector of length n.
# Probability density function for an Inverse Gamma distribution
z <-density_inverse_gamma(shape = 1, scale = 2,x=.001 * seq(0, 300, 1))
# Computing the probability that the random variable X following an Inverse Gamma distribution
# with shape 1 and scale 2 is lower than x
z<-cdf_inverse_gamma(shape = 1, scale = 2, x = 1:10)
z
# Generating a random vector with each component drawn from an Inverse Gamma distribution
# with shape 1 and scale 2
z<- random_inverse_gamma(shape = 1, scale = 2, n = 10)
z
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.