regsamlmu: Sample L-moments of multiple data sets

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/lmomRFA.r

Description

Computes the “unbiased” sample L-moments and L-moment ratios of multiple sets of data stored in a list or matrix. Following the paradigm of regional frequency analysis, we regard the data sets as coming from different measurement sites.

Usage

1
regsamlmu(x, nmom = 5, sort.data = TRUE, lcv = TRUE)

Arguments

x

A list of numeric vectors, or a numeric matrix.

nmom

Number of L-moments to be computed.

sort.data

Logical: whether each data set should be sorted.

lcv

Logical. If TRUE, the second L-moment will be expressed as a fraction of the mean, i.e. the computed value will be the sample L-CV t=l_2/l_1. If FALSE, the second L-moment will simply be the sample L-scale value l_2.

Details

Sample L-moments are computed for each data set. The calculations use samlmu internally. If x is a list, each list element should contain data for one site and the names of the list elements should be the site names. If x is a matrix, each column should contain data for one site and the column names should be the site names.

Value

An object of class regdata. It is a data frame with columns "name" and "n", containing respectively the site names and the number of non-missing data values at each site, and further columns containing the L-moments and L-moment ratios, in the order l_1, t (or l_2), t_3, t_4, etc.

Note

The default parameter values are chosen to be convenient for the regional frequency analysis methods described by Hosking and Wallis (1997). Note that the number of L-moments and the choice of whether to return L-CV or L-scale are different from the defaults for samlmu.

Author(s)

J. R. M. Hosking [email protected]

References

Hosking, J. R. M., and Wallis, J. R. (1997). Regional frequency analysis: an approach based on L-moments. Cambridge University Press.

Examples

1
2
3
4
5
data(Maxwind)       # a list
regsamlmu(Maxwind)

data(airquality)    # a data frame
regsamlmu(airquality[1:4])

Example output

Loading required package: lmom
                      name  n      l_1          t        t_3        t_4
1      (  2) Montgomery AL 28 45.35714 0.09577136 0.23161248 0.24895531
2    ( 17) Jacksonville FL 28 48.71429 0.11279461 0.22965816 0.19048183
3        ( 18) Key West FL 19 51.00000 0.18208921 0.34716254 0.12454623
4           ( 19) Tampa FL 10 49.40000 0.09716599 0.09375000 0.15426587
5           ( 21) Macon GA 28 45.03571 0.09895145 0.04061922 0.08382766
6        ( 22) Savannah GA 32 47.65625 0.10654680 0.25860631 0.19655241
7   ( 77) Cape Hatteras NC 45 57.91111 0.11218866 0.28185381 0.17180088
8      ( 80) Wilmington NC 26 49.88462 0.11383192 0.34231915 0.15496566
9     (107) Brownsville TX 35 43.62857 0.10300859 0.19371728 0.15087203
10 (108) Corpus Christi TX 34 54.47059 0.12291380 0.51073283 0.31502338
11    (111) Port Arthur TX 25 53.08000 0.09890731 0.20861284 0.14138905
12        (116) Norfolk VA 20 48.75000 0.10304993 0.13253012 0.15220986
            t_5
1   0.196359974
2   0.037476390
3   0.043460142
4   0.042824074
5  -0.007009613
6   0.037111581
7   0.062666672
8   0.091433280
9   0.055777971
10  0.223161758
11  0.083699103
12  0.038953769
     name   n        l_1         t         t_3        t_4          t_5
1   Ozone 116  42.129310 0.4186742  0.28394953 0.10661829 0.0322264031
2 Solar.R 146 185.931507 0.2762538 -0.12409668 0.02951971 0.0368883707
3    Wind 153   9.957516 0.1990698  0.06380805 0.12442303 0.0054960294
4    Temp 153  77.882353 0.0689354 -0.08645021 0.11390839 0.0006214804

lmomRFA documentation built on Aug. 2, 2017, 9:03 a.m.