| gig | R Documentation |
Density, distribution function, quantile function and
random generation for the generalised inverse-Gaussian distribution
with parameters p, a and b.
dgig(x, p, a, b, log = FALSE)
rgig(n, p, a, b, seed = 0)
pgig(q, p, a, b, lower.tail = TRUE, log.p = FALSE)
qgig(prob, p, a, b, lower.tail = TRUE, log.p = FALSE)
x, q |
vector of quantiles. |
p |
parameter |
a, b |
parameters |
log, log.p |
logical; if |
n |
number of observations. |
seed |
Seed for the random generation. |
lower.tail |
logical; if |
prob |
vector of probabilities. |
The generalised inverse-Gaussian distribution has density given by
f(x; p, a, b) = ((a/b)^{p/2})/(2K_p(\sqrt{ab})) x^{p-1} \exp\{-(a/2)x - (b/2)/x\},
where K_p is modified Bessel function of the second kind of order p,
x>0, a,b>0 and p\in\mathbb{R}.
See Jørgensen (1982) for further details.
dgig gives the density, pgig gives the distribution function, qgig gives the quantile function, and rgig generates random deviates.
Invalid arguments will result in return value NaN, with a warning.
The length of the result is determined by n for rgig.
Jørgensen, Bent (1982). Statistical Properties of the Generalized Inverse Gaussian Distribution. Lecture Notes in Statistics. 9. New York–Berlin: Springer-Verlag. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/978-1-4612-5698-4")}
dnig, dig, digam
rgig(20, p = 1, a = 1, b = 1)
pgig(0.4, p = 1, a = 1, b = 1)
qgig(0.8, p = 1, a = 1, b = 1)
plot(function(x){dgig(x, p = 1, a = 1, b = 1)}, main =
"Generalised inverse-Gaussian density", ylab = "Probability density",
xlim = c(0,10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.