Learn R Programming

GeneralizedHyperbolic (version 0.8-6)

nigFitStart: Find Starting Values for Fitting a normal inverse Gaussian Distribution

Description

Finds starting values for input to a maximum likelihood routine for fitting normal inverse Gaussian distribution to data.

Usage

nigFitStart(x, startValues = c("FN","Cauchy","MoM","US"),
              paramStart = NULL,
              startMethodMoM = c("Nelder-Mead","BFGS"), ...)
  nigFitStartMoM(x, startMethodMoM = "Nelder-Mead", ...)

Value

nigFitStart returns a list with components:

paramStart

A vector with elements mu, delta, alpha and beta giving the starting value of param.

xName

A character string with the actual x argument name.

breaks

The cell boundaries found by a call to hist.

midpoints

The cell midpoints found by a call to hist.

empDens

The estimated density found by a call to hist.

nigFitStartMoM returns only the method of moments estimates as a vector with elements mu, delta, alpha and

beta.

Arguments

x

data vector.

startValues

a character strin specifying the method for starting values to consider. See Details.

paramStart

starting values for param if startValues = "US".

startMethodMoM

Method used by call to optim in finding method of moments estimates.

...

Passes arguments to hist and optim.

Author

David Scott d.scott@auckland.ac.nz, Christine Yang Dong

Details

Possible values of the argument startValues are the following:

"US"

User-supplied.

"FN"

A fitted normal distribution.

"Cauchy"

Based on a fitted Cauchy distribution, from fitdistr() of the MASS package.

"MoM"

Method of moments.

If startValues = "US" then a value must be supplied for paramStart.

If startValues = "MoM", nigFitStartMoM is called. If startValues = "MoM" an initial optimisation is needed to find the starting values. These optimisations call optim.

References

Barndorff-Nielsen, O. (1977) Exponentially decreasing distributions for the logarithm of particle size, Proc. Roy. Soc. Lond., A353, 401--419.

Barndorff-Nielsen, O., Blæsild, P., Jensen, J., and Sörenson, M. (1985). The fascination of sand. In A celebration of statistics, The ISI Centenary Volume, eds., Atkinson, A. C. and Fienberg, S. E., pp. 57--87. New York: Springer-Verlag.

Fieller, N. J., Flenley, E. C. and Olbricht, W. (1992) Statistics of particle size data. Appl. Statist., 41, 127--146.

See Also

dnig, dskewlap, nigFit, hist, optim, fitdistr.

Examples

Run this code
param <- c(2, 2, 2, 1)
dataVector <- rnig(500, param = param)
nigFitStart(dataVector, startValues = "FN")
nigFitStartMoM(dataVector)
nigFitStart(dataVector, startValues = "MoM")

Run the code above in your browser using DataLab