fit.hyperb {HyperbolicDist}R Documentation

Fit the Hyperbolic Distribution to Data

Description

Fits a hyperbolic distribution to data. Displays the histogram, log-histogram (both with fitted densities) and qqplot for the fit which has the maximum likelihood.

Usage

    fit.hyperb(x, freq = NULL, breaks = NULL, theta.start = NULL, 
      start.values = c("all"), method = c("BFGS"), max.lh = FALSE, 
      plots = TRUE, leave.on = FALSE, controlbfgs = list(maxit = 100), 
      controlnm = list(maxit = 1000), maxitnlm = 1500, ...)

Arguments

x data vector
freq a vector of weights with length equal to length(x)
breaks breaks for histogram, defaults to those generated by hist(x,right=F,plot=F)
theta.start a user specified starting parameter vector taking the form c(pi,zeta,delta,mu)
start.values vector of the different starting values to consider. See Details
method vector of the different optimisation methods to consider. See Details
max.lh logical; if TRUE, function only outputs for the start.values/method combination that results in the highest likelihood
plots logical; if FALSE suppresses printing of the histogram, log-histogram and qqplot
leave.on for use with plotting devices. When TRUE does not close off the plotting device (eg. postscript) after writing the 3 plots
controlbfgs a list of control parameters for optim when using the "BFGS" optimisation
controlnm a list of control parameters for optim when using the "Nelder-Mead" optimisation
maxitnlm a positive integer specifying the maximum number of iterations when using the "nlm" optimisation
... passes arguments to par, hist, log.hist and qqplot

Details

Entries in the start.values vector are from the following:

The three optimisation methods currently available are:

Value

A list with components

pars a dataframe displaying the results of maximisation. Consists of columns for pi, zeta, delta, mu, LogLikelihood, Convergence and Iterations. See the relevant documentation (either optim or nlm) for details on convergence
breaks the breaks used
starting.values a dataframe displaying the various starting values considered

Author(s)

David Scott d.scott@auckland.ac.nz, Ai-Wei Lee, Jennifer Tso, Richard Trendall

References

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

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

See Also

optim, nlm, par, hist, log.hist, qqplot and dskewlap

Examples

theta <- c(2,2,2,2)
data.vector <- rhyperb(500,theta)
## See how well fit.hyperb works
fit.hyperb(data.vector)

## Use nlm instead of default
fit.hyperb(data.vector,method="nlm")


[Package HyperbolicDist version 0.0-1 Index]