Finds starting values for input to a maximum likelihood routine for fitting normal inverse Gaussian distribution to data.
nigFitStart(x, startValues = c("FN","Cauchy","MoM","US"),
paramStart = NULL,
startMethodMoM = c("Nelder-Mead","BFGS"), ...)
nigFitStartMoM(x, startMethodMoM = "Nelder-Mead", ...)
data vector.
a character
strin specifying the
method for starting values to consider. See Details.
starting values for param if startValues = "US"
.
Method used by call to optim
in
finding method of moments estimates.
nigFitStart
returns a list with components:
A vector with elements mu
, delta
,
alpha
and beta
giving the
starting value of param.
A character string with the actual x
argument name.
The cell boundaries found by a call to
hist
.
The cell midpoints found by a call to
hist
.
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.
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
.
Barndorff-Nielsen, O. (1977) Exponentially decreasing distributions for the logarithm of particle size, Proc. Roy. Soc. Lond., A353, 401--419.
Barndorff-Nielsen, O., Bl<e6>sild, P., Jensen, J., and S<U+001B296E>son, 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.
# NOT RUN {
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