Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

fun.comp.moments.ml.2

Compare the moments of the data and the fitted univariate generalised lambda distribution. Specialised funtion designed for RMFMKL.ML and STAR methods.


Description

After fitting the distribution, it is often desirable to see whether the moments of the data matches with the fitted distribution. This function computes the theoretical and actual moments for the FMKL GLD maximum likelihood estimation and starship method.

Usage

fun.comp.moments.ml.2(theo.obj, data, name = "ML")

Arguments

theo.obj

Fitted distribution parameters, there should be two sets, both FMKL GLD.

data

Data set used

name

Naming the method used in fitting the distribution, by default this is "ML".

Value

r.mat

A matrix showing the mean, variance, skewness and kurtosis of the fitted distribution in comparison to the data set.

eval.mat

Absolute difference in each of the four moments from the data under each of the distibutional fits.

Note

To compare all three fits under fun.data.fit.ml see fun.comp.moments.ml function.

Author(s)

Steve Su

See Also

Examples

## Generate random normally distributed observations.
# junk<-rnorm(1000,3,2)

## Fit the dataset using fun.data.ml
# fit<-cbind(fun.RMFMKL.ml(junk),starship(junk)$lambda)

## Compare the resulting fits. It is usually the case the maximum likelihood 
## provides better estimation of the moments than the starship method.
# fun.comp.moments.ml.2(fit,junk)

GLDEX

Fitting Single and Mixture of Generalised Lambda Distributions (RS and FMKL) using Various Methods

v2.0.0.7
GPL (>= 3)
Authors
Steve Su, with contributions from: Diethelm Wuertz, Martin Maechler and Rmetrics core team members for low discrepancy algorithm, Juha Karvanen for L moments codes, Robert King for gld C codes and starship codes, Benjamin Dean for corrections and input in ks.gof code and R core team for histsu function.
Initial release
2020-02-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.