fit.gpd {gld} | R Documentation |
Estimate parameters of the GPD type generalised lambda distribution
Description
Estimates parameters of the GPD type generalised \lambda
Distribution. Estimation is via method of L moments or the starship method.
The Method of L-Moments estimates for the GPD type are the only estimates for any generalised lambda distribution type with closed form expressions, and the only with algebraic results for standard errors of the estimates.
For further details on the starship method, see starship
.
Usage
fit.gpd(x, method = "LM", na.rm = TRUE, record.cpu.time = TRUE, return.data = FALSE,
LambdaZeroEpsilon=1e-15)
fit.gpd.lmom(data, na.rm = TRUE,LambdaZeroEpsilon=1e-15)
fit.gpd.lmom.given(lmoms, n = NULL,LambdaZeroEpsilon=1e-15)
Arguments
x |
Data to be fitted, as a vector |
method |
A character string, to select the estimation method. The available methods are 1. "LM" for Method of L-Moments, 2. "SM" or "starship" for the Starship method. |
na.rm |
Logical: Should missing values be removed? |
record.cpu.time |
Logical: should the CPU time used in fitting be recorded in the fitted model object? |
return.data |
Logical: Should the function return the data (from the argument |
data |
Data to be fitted, as a vector |
lmoms |
A numeric vector containing two L-moments and two L-moment ratios, in the order |
n |
the sample size, defaults to NULL |
LambdaZeroEpsilon |
tolerance for lambda estimate of zero |
Details
The starship method calls the starship
function - see its help for more details.
The method of L-Moments equates sample L-Moments with expressions for the L-Moments of the GPD type GLD. Closed form expressions exist to give these estimates.
For many values there are two possible estimates for the same L Moment values, one in each of two regions of the GPD GLD parameter space, denoted region A and region B in van Staden (2013). More details on these regions can be found on page 154 of van Staden (2013).
If the 4th L-Moment ratio, \tau_4
is less than the minimum
value that \tau_4
can obtain for the GPD generalised lambda
distribution;
\tau_4^{(min)}=\frac{12-5\sqrt{6}}{12+5\sqrt{6}} \approx -0.0102051,
there is no possible L-Moment estimate (from either region A or B), and this function returns NA for the estimates.
When estimating from data, or for given L-Moments with n
given,
standard errors of the estimates are calculated if possible (standard errors are only finite if \lambda > -0.5
).
If \lambda
is zero, the GPD gld is a special case
the Quantile Based Skew Logistic Distribution. If the estimated \lambda
is within LambdaZeroEpsilon
of zero, standard errors for alpha, beta and delta are calculated for the Quantile Based Skew Logistic Distribution and NA is returned as the standard error of \lambda
.
Value
These functions return an object of class
"GldGPDFit
". It is a list, containing these components (optional components noted here);
estA |
The estimate in region A. This will be NULL if there is no estimate in region A |
estB |
The estimate in region B. This will be NULL if there is no estimate in region B |
warn |
(only if estA and estB are both NULL), the reason there are no
estimates. If this is the case, the function also issues a |
cpu |
A vector showing the computing time used, returned if
|
data |
The data, if |
param |
The character |
starship |
The value returned by |
Each of the estimate elements (if they are not NULL) are either a vector of length 4, or a 4 by 2 matrix if standard errors are calculated. The elements of the vector, or rows of the matrix are the estimated parameters, in order;
alpha |
location parameter |
beta |
scale parameter |
delta |
skewness parameter |
lambda |
kurtosis parameter |
The columns of the matrix are the parameter, and its standard error.
Author(s)
Robert King, robert.king.newcastle@gmail.com, https://github.com/newystats/
Paul van Staden
References
Van Staden, Paul J., & M.T. Loots. (2009), Method of L-moment Estimation for the Generalized Lambda Distribution. In Proceedings of the Third Annual ASEARC Conference. Callaghan, NSW 2308 Australia: School of Mathematical and Physical Sciences, University of Newcastle.
See Also
Examples
fit.gpd.lmom.given(c(1,.3,.6,.8))
example.data = rgl(n=300,c(5,2,0.8,-0.1),param="gpd")
fit.gpd(example.data)
fit.gpd(example.data,method="starship")