fitgl: Fitting of the Generalized Lambda Distribution.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Fitting of the Generalized Lambda Distribution with different estimators.

Usage

1
2
fitgl(x, start, inc = FALSE, na.rm = FALSE, method = c("mle", "hist",
"prob", "quant", "shape"), ...)

Arguments

x

A numeric vector of length at least one containing only finite values.

start

A numeric vector (optional), initial values for the parameters to be optimized.

inc

A logical value indicating wether the location (median) and scale (inter-quartile) should be included in the optimization or estimated by their smaple estimators. FALSE by default.

method

A character value specifying the method to use to fit the data.

na.rm

logical. Should missing values (including 'NaN') be removed?

...

additional arguments to be passed to the optimization function 'nlminb' or to the objective function. See 'method' argument for the availalbe additional arguments of the objective function.

Details

FIXME

Value

A list with components.

call

Calling function.

par

The best set of parameters found.

objective

The value of objective corresponding to par.

convergence

An integer code. 0 indicates successful convergence.

message

A character string giving any additional information returned by the optimizer, or NULL. For details, see nlminb documentation.

iterations

Number of iterations performed.

evaluations

Number of objective function and gradient function evaluations.

Author(s)

Yohan Chalabi and Diethelm Wuertz

References

Y. Chalabi, D. J. Scott and D. Wuertz, An Asymmetry-Steepness Parameterization of the Generalized Lambda Distribution. Working paper, 2012.

See Also

gldist, gldist-package

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Generate deviates
x <- rgl(1000, med = 1, iqr = 2, chi = 0, xi = .5)

# Fit the data set with the different methods
fitgl(x, inc = FALSE, method = "mle")
fitgl(x, inc = TRUE, method = "mle")

fitgl(x, inc = FALSE, method = "hist", breaks = "FD")
fitgl(x, inc = TRUE, method = "hist", breaks = "FD")

fitgl(x, inc = FALSE, method = "prob")
fitgl(x, inc = TRUE, method = "prob")

fitgl(x, inc = FALSE, method = "quant", len = 1000)
fitgl(x, inc = TRUE, method = "quant", len = 1000)

fitgl(x, method = "shape")

gldist documentation built on April 6, 2017, 2:33 p.m.