hyperbFit  R Documentation 
Fits a hyperbolic distribution to data. Displays the histogram, loghistogram (both with fitted densities), QQ plot and PP plot for the fit which has the maximum likelihood.
hyperbFit(x, freq = NULL, breaks = NULL, ThetaStart = NULL, startMethod = "NelderMead", startValues = "BN", method = "NelderMead", hessian = FALSE, plots = FALSE, printOut = FALSE, controlBFGS = list(maxit=200), controlNM = list(maxit=1000), maxitNLM = 1500, ...) ## S3 method for class 'hyperbFit' print(x, digits = max(3, getOption("digits")  3), ...) ## S3 method for class 'hyperbFit' plot(x, which = 1:4, plotTitles = paste(c("Histogram of ","LogHistogram of ", "QQ Plot of ","PP Plot of "), x$obsName, sep = ""), ask = prod(par("mfcol")) < length(which) && dev.interactive(), ...)
x 
Data vector for 
freq 
A vector of weights with length equal to 
breaks 
Breaks for histogram, defaults to those generated by

ThetaStart 
A user specified starting parameter vector Theta taking
the form 
startMethod 
Method used by 
startValues 
Code giving the method of determining starting values for finding the maximum likelihood estimate of Theta. 
method 
Different optimisation methods to consider. See Details. 
hessian 
Logical. If 
plots 
Logical. If 
printOut 
Logical. If 
controlBFGS 
A list of control parameters for 
controlNM 
A list of control parameters for 
maxitNLM 
A positive integer specifying the maximum number of
iterations when using the 
digits 
Desired number of digits when the object is printed. 
which 
If a subset of the plots is required, specify a subset of
the numbers 
plotTitles 
Titles to appear above the plots. 
ask 
Logical. If 
... 
Passes arguments to 
startMethod
can be either "BFGS"
or
"NelderMead"
.
startValues
can be one of the following:
"US"
Usersupplied.
"BN"
Based on BarndorffNielsen (1977).
"FN"
A fitted normal distribution.
"SL"
Based on a fitted skewLaplace distribution.
"MoM"
Method of moments.
For the details concerning the use of ThetaStart
,
startMethod
, and startValues
, see
hyperbFitStart
.
The three optimisation methods currently available are:
"BFGS"
Uses the quasiNewton method "BFGS"
as
documented in optim
.
"NelderMead"
Uses an implementation of the Nelder and
Mead method as documented in optim
.
"nlm"
Uses the nlm
function in R.
For details of how to pass control information for optimisation using
optim
and nlm
, see optim
and
nlm.
When method = "nlm"
is used, warnings may be produced. These do
not appear to be a problem.
A list with components:
Theta 
A vector giving the maximum likelihood estimate of
Theta, as 
maxLik 
The value of the maximised loglikelihood. 
hessian 
If 
method 
Optimisation method used. 
conv 
Convergence code. See the relevant documentation (either

iter 
Number of iterations of optimisation routine. 
x 
The data used to fit the hyperbolic distribution. 
xName 
A character string with the actual 
ThetaStart 
Starting value of Theta returned by call to

svName 
Descriptive name for the method finding start values. 
startValues 
Acronym for the method of finding start values. 
KNu 
Value of the Bessel function in the fitted density. 
breaks 
The cell boundaries found by a call to

midpoints 
The cell midpoints found by a call to

empDens 
The estimated density found by a call to

David Scott d.scott@auckland.ac.nz, AiWei Lee, Jennifer Tso, Richard Trendall, Thomas Tran
BarndorffNielsen, 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.
optim
, nlm
, par
,
hist
, logHist
, qqhyperb
,
pphyperb
, dskewlap
and
hyperbFitStart
.
Theta < c(2,2,2,2) dataVector < rhyperb(500, Theta) ## See how well hyperbFit works hyperbFit(dataVector) hyperbFit(dataVector, plots = TRUE) fit < hyperbFit(dataVector) par(mfrow = c(1,2)) plot(fit, which = c(1,3)) ## Use nlm instead of default hyperbFit(dataVector, method = "nlm")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.