gld (version 2.4.1)

fit.fkml: Estimate parameters of the FKML parameterisation of the generalised lambda distribution

Description

Estimates parameters of the FKML parameterisation of the Generalised $lambda$ Distribution. Five estimation methods are available; Numerical Maximum Likelihood, Maximum Product of Spacings, Titterington's Method, the Starship (also available in the starship function, which uses the same underlying code as this for the fkml parameterisation), and Trimmed L-Moments.

Usage

fit.fkml(x, method = "ML", t1 = 0, t2 = 0, l3.grid = c(-0.9, -0.5, -0.1, 0, 0.1, 0.2, 0.4, 0.8, 1, 1.5), l4.grid = l3.grid, record.cpu.time = TRUE, optim.method = "Nelder-Mead", inverse.eps = .Machine$double.eps, optim.control=list(maxit=10000), optim.penalty=1e20, return.data=FALSE)

Arguments

x
Data to be fitted, as a vector
method
A character string, to select the estimation method. One of: ML for Numerical Maximum Likelihood, MPS or MSP for Maximum Product of Spacings, TM for Titterington's Method, SM for Starship Method, TL for Method of TL-moments, or DLA for the method of distributional least absolutes.
t1
Number of observations to be trimmed from the left in the conceptual sample, $t1$ (A non-negative integer, only used by TL-moment estimation, see details section)
t2
Number of observations to be trimmed from the right in the conceptual sample, $t2$ (A non-negative integer, only used by TL-moment estimation, see details section). These two arguments are restricted by $t1+t2 < n$, where n is the sample size
l3.grid
A vector of values to form the grid of values of $lambda3$ used to find a starting point for the optimisation.
l4.grid
A vector of values to form the grid of values of $lambda4$ used to find a starting point for the optimisation.
record.cpu.time
Boolean --- should the CPU time used in fitting be recorded in the fitted model object?
optim.method
Optimisation method, use any of the options available under method of optim.
inverse.eps
Accuracy of calculation for the numerical determination of $F(x)$, defaults to .Machine$double.eps.
optim.control
List of options for the optimisation step. See optim for details.
optim.penalty
The penalty to be added to the objective function if parameter values are proposed outside the allowed region
return.data
Logical: Should the function return the data (from the argument data)?

Value

fit.fkml returns an object of class "starship" (regardless of the estimation method used).print prints the estimated values of the parameters, while summary.starship prints these by default, but can also provide details of the estimation process (from the components grid.results, data and optim detailed below).The value of fit.fkml is a list containing the following components:

Details

Maximum Likelihood Estimation of the generalised lambda distribution (gld) proceeds by calculating the density of the data for candidate values of the parameters. Because the gld is defined by its quantile function, the method first numerically obtains F(x) by inverting Q(u), then obtains the density for that observation.

Maximum Product of Spacings estimation (sometimes referred to as Maximum Spacing Estimation, or Maximum Spacings Product) finds the parameter values that maximise the product of the spacings (the difference between successive depths, $F(x_(i+1);theta)-F(x_(i);theta)$, where $F(x;theta)$ is the distribution function for the candidate values of the parameters). See Dean (2013) and Cheng & Amin (1981) for details.

Titterington (1985) remarked that MPS effectively added an ``extra observation''; there are N data points in the original sample, but N + 1 spacings in the expression maximised in MPS. Instead of using spacings between transformed data points, so method TM uses spacings between transformed, adjacently-averaged, data points. The spacings are given by $Di=F(z(i);theta)- F(z(i-1);theta)$, where $alpha1 = z0 < z1 < ...

The starship is built on the fact that the $gld$ is a transformation of the uniform distribution. Thus the inverse of this transformation is the distribution function for the gld. The starship method applies different values of the parameters of the distribution to the distribution function, calculates the depths q corresponding to the data and chooses the parameters that make these calculated depths closest (as measured by the Anderson-Darling statistic) to a uniform distribution. See King & MacGillivray (1999) for details.

TL-Moment estimation chooses the values of the parameters that minimise the difference between the sample Trimmed L-Moments of the data and the Trimmed L-Moments of the fitted distribution. TL-Moments are based on inflating the conceptual sample size used in the definition of L-Moments. The t1 and t2 arguments to the function define the extent of trimming of the conceptual sample. Thus, the default values of t1=0 and t2=0 reduce the TL-Moment method to L-Moment estimation. t1 and t2 give the number of observations to be trimmed (from the left and right respectively) from the conceptual sample of size $n+t1+t2$. These two arguments should be non-negative integers, and $t1+t2 < n$, where n is the sample size. See Elamir and Seheult (2003) for more on TL-Moments in general, Asquith, (2007) for TL-Moments of the RS parameterisation of the gld and Dean (2013) for more details on TL-Moment estimation of the gld.

The method of distributional least absolutes (DLA) minimises the sum of absolute deviations between the order statistics and their medians (based on the candidate parameters). See Dean (2013) for more information.

References

Asquith, W. H. (2007), L-Moments and TL-Moments of the Generalized Lambda Distribution, Computational Statistics & Data Analysis, 51, 4484--4496.

Cheng, R.C.H. & Amin, N.A.K. (1981), Maximum Likelihood Estimation of Parameters in the Inverse Gaussian Distribution, with Unknown Origin, Technometrics, 23(3), 257--263. http://www.jstor.org/stable/1267789

Dean, B. (2013) Improved Estimation and Regression Techniques with the Generalised Lambda Distribution, PhD Thesis, University of Newcastle http://nova.newcastle.edu.au/vital/access/manager/Repository/uon:13503

Elamir, E. A. H., and Seheult, A. H. (2003), Trimmed L-Moments, Computational Statistics & Data Analysis, 43, 299--314.

King, R.A.R. & MacGillivray, H. L. (1999), A starship method for fitting the generalised $lambda$ distributions, Australian and New Zealand Journal of Statistics 41, 353--374.

Titterington, D. M. (1985), Comment on `Estimating Parameters in Continuous Univariate Distributions', Journal of the Royal Statistical Society, Series B, 47, 115--116.

See Also

starship GeneralisedLambdaDistribution

Examples

Run this code
example.data <- rgl(200,c(3,1,.4,-0.1),param="fkml")
example.fit <- fit.fkml(example.data,"MSP",return.data=TRUE)
print(example.fit)
summary(example.fit)
plot(example.fit,one.page=FALSE)

Run the code above in your browser using DataLab