dist.Inverse.Gaussian {LaplacesDemon} | R Documentation |
Inverse Gaussian Distribution
Description
This is the density function and random generation from the inverse gaussian distribution.
Usage
dinvgaussian(x, mu, lambda, log=FALSE)
rinvgaussian(n, mu, lambda)
Arguments
n |
This is the number of draws from the distribution. |
x |
This is the scalar location to evaluate density. |
mu |
This is the mean parameter, |
lambda |
This is the inverse-variance parameter,
|
log |
Logical. If |
Details
Application: Continuous Univariate
Density:
Inventor: Schrodinger (1915)
Notation 1:
Notation 2:
Parameter 1: shape
Parameter 2: scale
Mean:
Variance:
Mode:
The inverse-Gaussian distribution, also called the Wald distribution, is
used when modeling dependent variables that are positive and
continuous. When
(or variance
to zero), the inverse-Gaussian distribution becomes similar to a normal
(Gaussian) distribution. The name, inverse-Gaussian, is misleading,
because it is not the inverse of a Gaussian distribution, which is
obvious from the fact that
must be positive.
Value
dinvgaussian
gives the density and
rinvgaussian
generates random deviates.
References
Schrodinger E. (1915). "Zur Theorie der Fall-und Steigversuche an Teilchenn mit Brownscher Bewegung". Physikalische Zeitschrift, 16, p. 289–295.
See Also
Examples
library(LaplacesDemon)
x <- dinvgaussian(2, 1, 1)
x <- rinvgaussian(10, 1, 1)
#Plot Probability Functions
x <- seq(from=1, to=20, by=0.1)
plot(x, dinvgaussian(x,1,0.5), ylim=c(0,1), type="l", main="Probability Function",
ylab="density", col="red")
lines(x, dinvgaussian(x,1,1), type="l", col="green")
lines(x, dinvgaussian(x,1,5), type="l", col="blue")
legend(2, 0.9, expression(paste(mu==1, ", ", sigma==0.5),
paste(mu==1, ", ", sigma==1), paste(mu==1, ", ", sigma==5)),
lty=c(1,1,1), col=c("red","green","blue"))