Learn R Programming

VarianceGamma (version 0.1-2)

vgFitStart: Find Starting Values for Fitting a Variance Gamma Distribution

Description

Finds starting values for input to a maximum likelihood routine for fitting variance gamma distribution to data.

Usage

vgFitStart(x, breaks = NULL, startValues = "SL", paramStart = NULL,
             startMethodSL = "Nelder-Mead",
             startMethodMoM = "Nelder-Mead", ...)
  vgFitStartMoM(x, startMethodMoM = "Nelder-Mead", ...)

Arguments

x
Data vector.
breaks
Breaks for histogram. If missing, defaults to those generated by hist(x, right = FALSE, plot = FALSE).
startValues
Vector of the different starting values to consider. See Details.
paramStart
Starting values for param if startValues = "US".
startMethodSL
Method used by call to optim in finding skew Laplace estimates.
startMethodMoM
Method used by call to optim in finding method of moments estimates.
...
Passes arguments to optim.

Value

  • vgFitStart returns a list with components:
  • vgStartA vector with elements vgC, lSigma (log of sigma), theta and lNu (log of nu) giving the starting value of param.
  • xNameA character string with the actual x argument name.
  • breaksThe cell boundaries found by a call to hist.
  • midpointsThe cell midpoints found by a call to hist.
  • empDensThe estimated density found by a call to hist.
  • vgFitStartMoM returns only the method of moments estimates as a vector with elements vgC, lSigma (log of sigma), theta and lNu (log of nu).

code

optim

emph

et al

Details

Possible values of the argument startValues are the following:
  • "US"
{User-supplied.} "SL"{Based on a fitted skew-Laplace distribution.} "MoM"{Method of moments.}

References

Seneta, E. (2004). Fitting the variance-gamma model to financial data. J. Appl. Prob., 41A:177--187.

See Also

dvg, dskewlap, vgFit, hist, and optim.

Examples

Run this code
param <- c(0,0.5,0,0.5)
dataVector <- rvg(500, param = param)
vgFitStart(dataVector,startValues="SL")
vgFitStartMoM(dataVector)
vgFitStart(dataVector,startValues="MoM")

Run the code above in your browser using DataLab