MLE_LambertW: Maximum Likelihood Estimation for Lambert W \times F...

View source: R/MLE_LambertW.R

MLE_LambertWR Documentation

Maximum Likelihood Estimation for Lambert W \times F distributions

Description

Maximum Likelihood Estimation (MLE) for Lambert W \times F distributions computes \widehat{\theta}_{MLE}.

For type = "s", the skewness parameter \gamma is estimated and \delta = 0 is held fixed; for type = "h" the one-dimensional \delta is estimated and \gamma = 0 is held fixed; and for type = "hh" the 2-dimensional \delta is estimated and \gamma = 0 is held fixed.

By default \alpha = 1 is fixed for any type. If you want to also estimate \alpha (for type = "h" or "hh") set theta.fixed = list().

Usage

MLE_LambertW(
  y,
  distname,
  type = c("h", "s", "hh"),
  theta.fixed = list(alpha = 1),
  use.mean.variance = TRUE,
  theta.init = get_initial_theta(y, distname = distname, type = type, theta.fixed =
    theta.fixed, use.mean.variance = use.mean.variance, method = "IGMM"),
  hessian = TRUE,
  return.estimate.only = FALSE,
  optim.fct = c("optim", "nlm", "solnp"),
  not.negative = FALSE
)

Arguments

y

a numeric vector of real values.

distname

character; name of input distribution; see get_distnames.

type

type of Lambert W \times F distribution: skewed "s"; heavy-tail "h"; or skewed heavy-tail "hh".

theta.fixed

a list of fixed parameters in the optimization; default only alpha = 1.

use.mean.variance

logical; if TRUE it uses mean and variance implied by \boldsymbol \beta to do the transformation (Goerg 2011). If FALSE, it uses the alternative definition from Goerg (2016) with location and scale parameter.

theta.init

a list containing the starting values of (\alpha, \boldsymbol \beta, \gamma, \delta) for the numerical optimization; default: see get_initial_theta.

hessian

indicator for returning the (numerically obtained) Hessian at the optimum; default: TRUE. If the numDeriv package is available it uses numDeriv::hessian(); otherwise stats::optim(..., hessian = TRUE).

return.estimate.only

logical; if TRUE, only a named flattened vector of \widehat{\theta}_{MLE} will be returned (only the estimated, non-fixed values). This is useful for simulations where it is usually not necessary to give a nicely organized output, but only the estimated parameter. Default: FALSE.

optim.fct

character; which R optimization function should be used. Either 'optim' (default), 'nlm', or 'solnp' from the Rsolnp package (if available). Note that if 'nlm' is used, then not.negative = TRUE will be set automatically.

not.negative

logical; if TRUE, it restricts delta or gamma to the non-negative reals. See theta2unbounded for details.

Value

A list of class LambertW_fit:

data

data y,

loglik

scalar; log-likelihood evaluated at the optimum \widehat{\theta}_{MLE},

theta.init

list; starting values for numerical optimization,

beta

estimated \boldsymbol \beta vector of the input distribution via Lambert W MLE (In general this is not exactly identical to \widehat{\boldsymbol \beta}_{MLE} for the input data),

theta

list; MLE for \theta,

type

see Arguments,

hessian

Hessian matrix; used to calculate standard errors (only if hessian = TRUE, otherwise NULL),

call

function call,

distname

see Arguments,

message

message from the optimization method. What kind of convergence?,

method

estimation method; here "MLE".

Examples


# See ?LambertW-package


LambertW documentation built on Nov. 2, 2023, 6:17 p.m.