
An iterative method of moments estimator to find this type = 's'
(type = 'h'
or type = "hh"
) which minimizes the distance between
the sample and theoretical skewness (or kurtosis) of
This algorithm is only well-defined for data with finite mean and variance
input X. See analyze_convergence
and references therein
for details.
IGMM(
y,
type = c("h", "hh", "s"),
skewness.x = 0,
kurtosis.x = 3,
tau.init = get_initial_tau(y, type),
robust = FALSE,
tol = .Machine$double.eps^0.25,
location.family = TRUE,
not.negative = NULL,
max.iter = 100,
delta.lower = -1,
delta.upper = 3
)
A list of class LambertW_fit
:
see Arguments
data y
number of observations
see Arguments
starting values for
IGMM estimate for
entire iteration trace of K <= max.iter
.
number of iterations only performed in GMM algorithm to find optimal
number of iterations to update
Hessian matrix (obtained from simulations; see References)
function call
see Arguments
a character string describing distribution characteristics given
the target theoretical skewness/kurtosis for the input. Same information as skewness.x
and kurtosis.x
but human-readable.
see Arguments
message from the optimization method. What kind of convergence?
estimation method; here: "IGMM"
a numeric vector of real values.
type of Lambert W "s"
;
heavy-tail "h"
; or skewed heavy-tail "hh"
.
theoretical skewness of input X; default 0
(symmetric distribution).
theoretical kurtosis of input X; default 3
(Normal
distribution reference).
starting values for IGMM algorithm; default:
get_initial_tau
. See also gamma_Taylor
and
delta_Taylor
.
logical; only used for type = "s"
. If TRUE
a
robust estimate of asymmetry is used (see
medcouple_estimator
); default: FALSE
.
a positive scalar specifiying the tolerance level for terminating
the iterative algorithm. Default: .Machine$double.eps^0.25
logical; tell the algorithm whether the underlying
input should have a location family distribution (for example, Gaussian
input); default: TRUE
. If FALSE
(e.g., for
"exp"
onential input), then tau['mu_x'] = 0
throughout the
optimization.
logical; if TRUE
, the estimate for NULL
(default) then it will be set internally to TRUE
for
heavy-tail(s) Lambert Wtype = "h"
or "hh"
). For skewed Lambert Wtype = "s"
)
it will be set to FALSE
, unless it is not a location-scale family
(see get_distname_family
).
maximum number of iterations; default: 100
.
lower and upper bound for
delta_GMM
optimization. By default: -1
and 3
which covers most real-world heavy-tail scenarios.
Georg M. Goerg
For algorithm details see the References.
delta_GMM
, gamma_GMM
, analyze_convergence
# estimate tau for the skewed version of a Normal
y <- rLambertW(n = 100, theta = list(beta = c(2, 1), gamma = 0.2),
distname = "normal")
fity <- IGMM(y, type = "s")
fity
summary(fity)
plot(fity)
if (FALSE) {
# estimate tau for the skewed version of an exponential
y <- rLambertW(n = 100, theta = list(beta = 1, gamma = 0.5),
distname = "exp")
fity <- IGMM(y, type = "s", skewness.x = 2, location.family = FALSE)
fity
summary(fity)
plot(fity)
# estimate theta for the heavy-tailed version of a Normal = Tukey's h
y <- rLambertW(n = 100, theta = list(beta = c(2, 1), delta = 0.2),
distname = "normal")
system.time(
fity <- IGMM(y, type = "h")
)
fity
summary(fity)
plot(fity)
}
Run the code above in your browser using DataLab