| ig | R Documentation |
Density, distribution function, quantile function and
random generation for the inverse-Gaussian distribution
with parameters a and b.
dig(x, a, b, log = FALSE)
rig(n, a, b, seed = 0)
pig(q, a, b, lower.tail = TRUE, log.p = FALSE)
qig(p, a, b, lower.tail = TRUE, log.p = FALSE)
x, q |
vector of quantiles. |
a, b |
parameters |
log, log.p |
logical; if |
n |
number of observations. |
seed |
Seed for the random generation. |
lower.tail |
logical; if |
p |
vector of probabilities. |
The inverse-Gaussian distribution has density given by
f(x; a, b) = \frac{\sqrt{b}}{\sqrt{2\pi x^3}}\exp(
-\frac{a}{2}x -\frac{b}{2x} + \sqrt{ab}),
where x>0 and a,b>0. In this parameterization,
E(X) = \sqrt{b}/\sqrt{a}. See Tweedie (1957a, 1957b) for
further details.
dig gives the density, pig gives the distribution function, qig gives the quantile function, and rig generates random deviates.
Invalid arguments will result in return value NaN, with a warning.
The length of the result is determined by n for rig.
Tweedie, M. C. K. (1957a). "Statistical Properties of Inverse Gaussian Distributions I". Annals of Mathematical Statistics. 28 (2): 362–377. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/aoms/1177706964")}
Tweedie, M. C. K. (1957b). "Statistical Properties of Inverse Gaussian Distributions II". Annals of Mathematical Statistics. 28 (3): 696–705. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/aoms/1177706881")}
dnig, dgig, digam
rig(100, a = 1, b = 1)
pig(0.4, a = 1, b = 1)
qig(0.8, a = 1, b = 1)
plot(function(x){dig(x, a = 1, b = 1)}, main =
"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.