lmom.diff {lmomco} | R Documentation

## Difference Between L-moments of the Distribution and the L-moments of the Data

### Description

This function computes the difference between the L-moments derived from a parameterized distribution and the L-moments as computed from the data. This function is useful to characterize the bias that develops between the theoretical L-moments of a distribution and the L-moments of the data. This function also is an important test on the algorithms that fit distributions to the L-moments. The difference is computed as the L-moment from the distribution minus the L-moment of the data. The `lmorph` function is used internally to get the L-moment objects into the appropriate format.

### Usage

    lmom.diff(lmomparm, lmomdata, verbose=TRUE, digits=4)

### Arguments

`lmomparm` | L-moments of a distribution such as from `par2lmom`
`lmomdata` | L-moments of the data such as from `lmom.ub`
`verbose` | Logical switch on verbosity of output. Default is `TRUE`.
`digits` | Number of digits to pass internally to the `signif` function for rounding of results.

### Value

    "THE FIVE DIFFERENCES BETWEEN L-MOMENTS OF DISTRIBUTION AND DATA"

      L1diff    L2diff  T3diff  T4diff  T5diff

    1      0 -1.11e-16 -0.7345 -0.4005 -0.3942

where the five values are the differences between the theoretical L-moments of the fitted distribution and the sample L-moments of the data (theoretical minus sample) in the titled column. These values are also returned as part of an R `list`. If a `list` element has `numeric(0)` then likely one of the L-moments is `NULL` or `NA` for the distribution such as the results reported for the example involving the Generalized Logistic distribution (`glo`).
A dataframe of the difference is the returned value.

### Author(s)

W.H. Asquith

### See Also

`par2lmom`, `lmom2par`, `lmorph`

### Examples

      # The first three moment differences are zero because the GLO is only
      # fit to these and not the higher moments.
      lmr <- lmom.ub(rnorm(40))
      para <- lmom2par(lmr, type = 'glo')
      lmom.diff(par2lmom(para),lmr)

      # The first two moment differences are zero because the Normal is only
      # fit to these and not the higher moments.
      lmr <- lmom.ub(rnorm(40))
      lmr <- lmorph(lmr)
      para <- parnor(lmr)
      lmom.diff(lmomnor(para),lmr)

[Package lmomco version 0.92 Index]