Skip to contents

Selects a distribution from a set of candidate distributions by minimizing the Euclidean distance between the theoretical L-moment ratios \((\tau_3, \tau_4)\) and the sample L-moment ratios \((t_3, t_4)\).

For NS-FFA: To select a distribution for a nonstationary model, include the observation years (ns_years) and the nonstationary model structure (ns_structure). Then, this method will detrend the original, nonstationary data internally using the data_decomposition() function prior to distribution selection.

Usage

select_ldistance(data, ns_years = NULL, ns_structure = NULL)

Arguments

data

Numeric vector of observed annual maximum series values. Must be strictly positive, finite, and not missing.

ns_years

For NS-FFA only: Numeric vector of observation years corresponding to data. Must be the same length as data and strictly increasing.

ns_structure

For NS-FFA only: Named list indicating which distribution parameters are modeled as nonstationary. Must contain two logical scalars:

  • location: If TRUE, the location parameter has a linear temporal trend.

  • scale: If TRUE, the scale parameter has a linear temporal trend.

Value

A list with the results of distribution selection:

  • method: "L-distance".

  • decomposed_data: The detrended dataset used to compute the L-moments. For S-FFA, this is the data argument. For NS-FFA, it is output of data_decomposition().

  • metrics: A list of L-distance metrics for each candidate distribution.

  • recommendation: The name of the distribution with the smallest L-distance.

Details

For each candidate distribution, this method computes the Euclidean distance between sample L-moment ratios (\(\tau_3\), \(\tau_4\)) and the closest point on the theoretical distribution's L-moment curve. For two-parameter distributions (Gumbel, Normal, Log-Normal), the theoretical L-moment ratios are compared directly with the sample L-moment ratios. The distribution with the minimum distance is selected. If a distribution is fit to log-transformed data (Log-Normal or Log-Pearson Type III), the L-moment ratios for the log-transformed sample are used instead.

References

Hosking, J.R.M. & Wallis, J.R., 1997. Regional frequency analysis: an approach based on L-Moments. Cambridge University Press, New York, USA.

Examples

data <- rnorm(n = 100, mean = 100, sd = 10)
select_ldistance(data)
#> $method
#> [1] "L-distance"
#> 
#> $decomposed_data
#>   [1] 107.09347 111.33380  91.63655 113.57553  88.15262  96.71245 109.96926
#>   [8]  95.28064  94.79393 105.04564  89.21866 101.68685 101.67021 110.18532
#>  [15]  97.52121 106.62934  92.00706 103.19359 112.05010 106.43435 111.62498
#>  [22]  90.75030  87.44010 101.17884 112.19709  94.26940  88.09143 109.28352
#>  [29] 102.92654  84.25709  92.86221  95.25211 104.71987  86.07771 105.88744
#>  [36]  96.38812  98.28475 111.34012  85.61424  83.39046  95.75677 105.09897
#>  [43]  97.78265  96.43884  95.15888 101.54152 108.00823  92.30195 106.54658
#>  [50] 123.52926 103.63681 104.45167 104.92731  97.62798 117.74801 105.73499
#>  [57]  87.33038 106.28960 103.58367 102.87981 110.55310  99.95650 109.47916
#>  [64]  78.16191 100.11074  96.80422 110.29001 113.98892 101.32930 104.03966
#>  [71]  79.54288 116.02153 108.25178 105.00270  95.39139 100.04212  90.72727
#>  [78] 116.31053  93.67948  88.95316 107.74635 101.10127 102.14657 109.01056
#>  [85] 103.25412  93.44450  96.38329 100.96132 102.06288 106.86254 101.29751
#>  [92] 101.65906 103.89413  82.21160  96.41316  88.69358  84.49661  95.29414
#>  [99] 110.21652  95.51219
#> 
#> $metrics
#> $metrics$GUM
#> [1] 0.2284316
#> 
#> $metrics$NOR
#> [1] 0.05652286
#> 
#> $metrics$LNO
#> [1] 0.09746302
#> 
#> $metrics$GEV
#> [1] 0.003714425
#> 
#> $metrics$GLO
#> [1] 0.06164513
#> 
#> $metrics$GNO
#> [1] 0.01760647
#> 
#> $metrics$PE3
#> [1] 0.01621452
#> 
#> $metrics$LP3
#> [1] 0.01282008
#> 
#> $metrics$WEI
#> [1] 0.008401841
#> 
#> 
#> $recommendation
#> [1] "GEV"
#>