Functions to calculate the mean, variance, skewness, kurtosis and mode of a specific variance gamma distribution.
vgMean(vgC = 0, sigma = 1, theta = 0, nu = 1, param = c(vgC,sigma,theta,nu))
vgVar(vgC = 0, sigma = 1, theta = 0, nu = 1, param = c(vgC,sigma,theta,nu))
vgSkew(vgC = 0, sigma = 1, theta = 0, nu = 1, param = c(vgC,sigma,theta,nu))
vgKurt(vgC = 0, sigma = 1, theta = 0, nu = 1, param = c(vgC,sigma,theta,nu))
vgMode(vgC = 0, sigma = 1, theta = 0, nu = 1, param = c(vgC,sigma,theta,nu))
vgMean
gives the mean of the variance gamma distribution,
vgVar
the variance, vgSkew
the skewness, vgKurt
the
kurtosis, and vgMode
the mode.
The formulae used for the mean and variance are as given in
Seneta (2004).
If optim
.
The parameterisation of the variance gamma distribution used
for these functions is the
one. See vgChangePars
to transfer between parameterisations.
The location parameter
The spread parameter
The asymmetry parameter
The shape parameter
Specifying the parameters as a vector which takes the form
c(vgC,sigma,theta,nu)
.
David Scott d.scott@auckland.ac.nz, Christine Yang Dong c.dong@auckland.ac.nz
Seneta, E. (2004). Fitting the variance-gamma model to financial data. J. Appl. Prob., 41A:177--187. Kotz, S, Kozubowski, T. J., and Podgórski, K. (2001). The Laplace Distribution and Generalizations. Birkhauser, Boston, 349 p.
dvg
, vgChangePars
,vgCalcRange
,
besselK
.
param <- c(2,2,2,0.5)
vgMean(param = param)
## Or to specify parameter values individually, use:
vgMean (2,2,2,0.5)
vgVar(param = param)
vgSkew(param = param)
vgKurt(param = param)
vgMode(param = param)
maxDens <- dvg(vgMode(param = param), param = param)
vgRange <- vgCalcRange(param = param, tol = 10^(-2)*maxDens)
curve(dvg(x, param = param), vgRange[1], vgRange[2])
abline(v = vgMode(param = param), col = "blue")
abline(v = vgMean(param = param), col = "red")
Run the code above in your browser using DataLab