fit.fkml.moments.val(moments=c(mean=0, variance=1, skewness=0, kurtosis=3), optim.method="Nelder-Mead", optim.control= list(), starting.point = c(0,0))
optim
to use,
defaults to Nelder-Meadcontrol
, passed to optim
.gld
for more details)
fit.fkml.moments
(to come in version 2.4 of the gld
package) will estimate
using the method of moments for a dataset, including calculating the
sample moments.
This function uses optim
to find the parameters that
minimise the sum of squared differences between the skewness and kurtosis
sample ratios and their counterpart expressions for those ratios on the
basis of the parameters $lambda 3$ and
$lambda 4$.
On the basis of these estimates (and the mean and variance), this function
then estimates
$lambda 2$ and then $lambda 1$.Note that the first 4 moments don't uniquely identify members of the generalised $lambda$ distribution. Typically, for a set of moments that correspond to a unimodal gld, there is another set of parameters that give a distrbution with the same first 4 moments. This other distribution has a truncated appearance (that is it is on finite support and the density is non-zero at the end points). See the examples below.
Freimer, M., Mudholkar, G. S., Kollia, G. & Lin, C. T. (1988), A study of the generalized tukey lambda family, Communications in Statistics - Theory and Methods 17, 3547--3567. Lakhany, Asif and Mausser, Helmut (2000) Estimating the parameters of the generalized lambda distribution, Algo Research Quarterly, 3(3):47--58
van Staden, Paul (2013) Modeling of generalized families of probability distributions inthe quantile statistical universe, PhD thesis, University of Pretoria. http://repository.up.ac.za/handle/2263/40265
gld.moments
# Approximation to the standard normal distribution
norm.approx <- fit.fkml.moments.val(c(0,1,0,3))
norm.approx
# Another distribution with the same moments
another <- fit.fkml.moments.val(c(0,1,0,3),start=c(2,2))
# Compared
plotgld(norm.approx,ylim=c(0,0.75),main="Approximation of the standard normal")
plotgld(another,add=TRUE,col=2)
Run the code above in your browser using DataLab