This function uses the method of maximum likelihood (MLE) to estimate the parameters of a distribution. MLE is a straightforward optimization problem that is formed by maximizing the sum of the logarithms of probability densities. Let \(\Theta\) represent a vector of parameters for a candidate fit to the specified probability density function \(g(x|\Theta)\) and \(x_i\) represent the observed data for a sample of size \(n\). The objective function is
$$\mathcal{L}(\Theta) = -\sum_{i=1}^{n} \log\, g(x_i|\Theta)\mbox{,}$$
where the \(\Theta\) for a maximized \({-}\mathcal{L}\) (note the 2nd negation for the adjective “maximized”, optim()
defaults as a minimum optimizer) represents the parameters fit by MLE. The initial parameter estimate by default will be seeded by the method of L-moments.
mle2par(x, type, init.para=NULL, silent=TRUE, null.on.not.converge=TRUE,
ptransf= function(t) return(t),
pretransf=function(t) return(t), ...)
An R
list
is returned. This list should contain at least the following items, but some distributions such as the revgum
have extra.
The type of distribution in three character (minimum) format.
The parameters of the distribution.
Attribute specifying source of the parameters.
The Akaike information criterion (AIC).
The returned list
of the optim()
function.
A vector of data values.
Three character (minimum) distribution type (for example, type="gev"
), see dist.list
.
Initial parameters as a vector \(\Theta\) or as an lmomco parameter “object” from say vec2par
. If a vector is given, then internally vec2par
is called with distribution equal to type
.
A logical to silence the try()
function wrapping the optim()
function.
A logical to trigging simple return of NULL
if the optim()
function returns a nonzero convergence status.
An optional parameter transformation function (see Examples) that is useful to guide the optimization run. For example, suppose the first parameter of a three parameter distribution resides in the positive domain, then
ptransf(t) =
function(t) c(log(t[1]), t[2], t[3])
.
An optional parameter retransformation function (see Examples) that is useful to guide the optimization run. For example, suppose the first parameter of a three parameter distribution resides in the positive domain, then
pretransf(t) =
function(t) c(exp(t[1]), t[2], t[3])
.
Additional arguments for the optim()
function and other uses.
W.H. Asquith
lmom2par
, mps2par
, tlmr2par