qhgld: The Hurdle Generalized Lambda Distribution Family

Description Usage Arguments Details Value References Examples

View source: R/qhgld.R

Description

Quantile function of a Hurdle Generalized Lambda Distribution.

Usage

1
2
3
qhgld(p, mixture = FALSE, lambda1, lambda2 = NULL, prob = NULL,
  param = "fmkl", trace = FALSE, inverse.eps = 1e-08,
  max.iterations = 500)

Arguments

p

Vector of probabilities.

mixture

Whether to give the quantile function of a mixture of HGLDs.

lambda1

A vector of length 5 with the five parameters of the HGLD, or of the first HGLD if mixture = TRUE.

lambda2

A vector of length 4 with the four parameters of the second HGLD if mixture = TRUE.

prob

The cluster parameter for the mixture HGLD.

param

"fmkl" or "rs".

trace

Whether a progress bar must be printed in order to trace the algorithm.

inverse.eps

Accuracy of calculation for the numerical determination of F(x), defaults to 1e-8.

max.iterations

Maximum number of iterations in the numerical determination of F(x), defaults to 500.

Details

The HGLD must be non-negative, otherwise the quantile is only approximate. If the parametrization of the RS or FMKL GLD is not acceptable, the function returns NA. This function is based on the GLDEX package.

Value

The quantile function of a HGLD.

References

Marcondes, D.; Peixoto, C.; Maia, A. C.; A Survey of a Hurdle Model for Heavy-Tailed Data Based on the Generalized Lambda Distribution. (2017) arxiv1712.02183

Su, S.; Fitting Single and Mixture of Generalized Lambda Distributions to Data via Discretized and Maximum Likelihood Methods: GLDEX in R. (2007), Journal of Statistical Software: *21* 9.

Examples

1
2
3
4
5
qhgld(p = seq(0.05,1,0.05),lambda1 = c(0.540,3.561,0.019,0.009,0.022),param = "rs")

#mixture
qhgld(p = seq(0.05,1,0.05),mixture = TRUE,lambda1 = c(0.1,8,1,3,6),lambda2 = c(0.3,10,3,6),
      prob = 0.5,param = "fmkl")

dmarcondes/HGLD documentation built on May 28, 2019, 12:56 p.m.