| Type: | Package |
| Title: | Quantile Least Mahalanobis Distance Estimator for Tukey g-&-h Mixture |
| Version: | 0.3.0 |
| Date: | 2026-07-16 |
| Description: | Functions for simulation, estimation, and model selection of finite mixtures of Tukey g-and-h distributions. The author has retired from academic research. Accordingly, this package should not be considered a validated tool for use in peer-reviewed publications or as the basis for grant applications. Backward compatibility with user-code published in <doi:10.1007/s11222-025-10596-9> is not maintained in versions >= 0.3.0 (July 2026) of this package. The authors of those publications are the appropriate contacts for reproducibility inquiries. |
| License: | GPL-2 |
| Encoding: | UTF-8 |
| Language: | en-US |
| Depends: | R (≥ 4.6) |
| Imports: | cli |
| Config/roxygen2/version: | 8.0.0 |
| NeedsCompilation: | no |
| Packaged: | 2026-07-16 14:07:53 UTC; tingtingzhan |
| Author: | Tingting Zhan |
| Maintainer: | Tingting Zhan <tingtingzhan@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-07-16 20:50:07 UTC |
QuantileGH: Quantile Least Mahalanobis Distance Estimator for Tukey g-&-h Mixture
Description
Functions for simulation, estimation, and model selection of finite mixtures of Tukey g-and-h distributions. The author has retired from academic research. Accordingly, this package should not be considered a validated tool for use in peer-reviewed publications or as the basis for grant applications. Backward compatibility with user-code published in doi:10.1007/s11222-025-10596-9 is not maintained in versions >= 0.3.0 (July 2026) of this package. The authors of those publications are the appropriate contacts for reproducibility inquiries.
Details
Tools for simulating and fitting finite mixtures of the 4-parameter Tukey g-&-h distributions.
Tukey g-&-h mixture is highly flexible to model multimodal distributions with variable degree of skewness and kurtosis in the components.
The Quantile Least Mahalanobis Distance estimator (QLMDe) is used for estimating parameters of the finite Tukey g-&-h mixtures.
QLMDe is an indirect estimator that minimizes the Mahalanobis distance between the sample and model-based quantiles.
A backward-forward stepwise model selection algorithm is provided to find
-
a parsimonious Tukey
g-&-hmixture model, conditional on a given number-of-components; and -
the optimal number of components within the user-specified range.
Note
This R package author has retired from academic research.
Accordingly, this package should not be considered a validated tool for use in peer-reviewed publications or as the basis for grant applications.
Backward compatibility with user-code published in the following publications is not maintained in versions >= 0.3.0 of this package. The authors of those publications are the appropriate contacts for reproducibility inquiries.
doi:10.1007/s11222-025-10596-9
Author(s)
Maintainer: Tingting Zhan tingtingzhan@gmail.com (ORCID)
Authors:
Tingting Zhan tingtingzhan@gmail.com (ORCID)
Determine Nearly-Equal Elements
Description
Determine nearly-equal elements and extract non-nearly-equal elements in a double vector.
Usage
unique_allequal(x, ...)
duplicated_allequal(x, ...)
Arguments
x |
|
... |
additional parameters of function |
Value
Function duplicated_allequal() returns a logical vector of the same length as the input vector,
indicating whether each element is nearly-equal to any of the previous elements.
Function unique_allequal() returns the non-nearly-equal elements in the input vector.
See Also
duplicated.default unique.default
Examples
(x = c(.3, 1-.7, 0, .Machine$double.eps))
duplicated.default(x) # not desired
unique.default(x) # not desired
duplicated_allequal(x)
unique_allequal(x)
unique_allequal(x, tol = .Machine$double.eps/2)
Test if Two double Vectors are Element-Wise (Nearly) Equal
Description
Test if two double vectors are element-wise (nearly) equal.
Usage
allequal_o_(target, current, tolerance = sqrt(.Machine$double.eps), ...)
Arguments
target |
length- |
current |
length- |
tolerance |
positive double scalar, default |
... |
potential parameters, currently not in use |
Details
Function allequal_o_() is different from all.equal.numeric, such that
element-wise comparison is performed, in a fashion similar to function outer
a logical scalar is always returned for each element-wise comparison.
Value
Function allequal_o_() returns an n_t\times n_c logical matrix
indicating whether the length-n_c vector current
is element-wise near-equal to
the length-n_t vector target
within the pre-specified tolerance.
Examples
allequal_o_(target = c(.3, 0), current = c(.3, 1-.7, 0, .Machine$double.eps))
Simpler and Faster Mahalanobis Distance
Description
Simpler and faster mahalanobis distance.
Usage
mahalanobis_(x, center, invcov)
Arguments
x |
|
center |
|
invcov |
numeric matrix, inverted variance-covariance |
Value
Function mahalanobis_() returns a numeric scalar.
Examples
# ?stats:::mahalanobis
S = cbind(1:6, 1:3) |> var()
mahalanobis(c(0, 0), 1:2, S)
mahalanobis_(c(0, 0), 1:2, solve(S))