rhgld: The Hurdle Generalized Lambda Distribution Family

Description Usage Arguments Details Value References Examples

View source: R/rhgld.R

Description

Sample from a Hurdle Generalized Lambda Distribution.

Usage

1
2
rhgld(n, mixture = FALSE, lambda1, lambda2 = NULL, prob = NULL,
  param = "fmkl")

Arguments

n

Number of observations to be generated.

mixture

Whether to sample from 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".

Details

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

A sample 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
set.seed(100)
rhgld(n = 1000,lambda1 = c(0.05,0,1,3,6),param = "fmkl")
rhgld(n = 1000,mixture = TRUE,lambda1 = c(0.05,0,1,3,6),lambda2 = c(0.3,2,3,6),prob = 0.5,
            param = "fmkl")

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