Rev Language Reference


dnVarianceGamma - Variance-gamma Distribution

Variance-gamma distribution with location ‘mu’.

Aliases

  • dnVG

Usage

dnVarianceGamma(Real mu, RealPos kappa, RealPos tau, RealPos time)

Arguments

mu : Real (pass by const reference)
The mean parameter.
Default : 0
kappa : RealPos (pass by const reference)
The standard deviation parameter.
Default : 1
tau : RealPos (pass by const reference)
The standard deviation parameter.
Default : 1
time : RealPos (pass by const reference)
The duration of time for the process.
Default : 1

Domain Type

Details

The variance-gamma distribution has density: f(x) = 1/(sqrt(2 pi) sigma) e^-((x - mu)^2/(2 sigma^2)) where mu is the mean of the distribution and sigma the standard deviation.

Example

# we simulate some oversations
x <- rnorm(n=10,mean=5,sd=10)
# let's see what the minum is (you could do the max too)
min(x)
# let's also see what the mean and the variance are
mean(x)
var(x)
sd(x)