Skip to contents

This function estimates the parameters of the four-parameter Kappa distribution using the method of L-moments. Since no closed-form solution for the parameters in terms of the L-moments is known, the parameters are estimated numerically using Newton-Raphson iteration.

Usage

fit_lmoments_kappa(data)

Arguments

data

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

Value

A list containing the results of parameter estimation:

  • data: The data argument.

  • distribution: "KAP".

  • method: "L-moments".

  • params: numeric vector of 4 parameters in the order location, scale, shape (2).

Details

First, the sample L-moments of the data are computed using utils_sample_lmoments(). Then, the stats::optim() function is used to determine the parameters by minimizing the euclidian distance between the sample and theoretical L-moment ratios. The implementation of this routine is based on the deprecated homtest package, formerly available at https://CRAN.R-project.org/package=homtest.

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)
fit_lmoments_kappa(data)
#> $data
#>   [1] 123.33102 129.98500 103.65176  96.13149 101.34976 127.82386  93.53035
#>   [8]  98.14358 108.50758  92.69139  99.54006 109.46315  97.90904  95.27777
#>  [15]  86.73009  85.38698 102.77775 112.91988  81.80512  94.74878 104.12961
#>  [22]  86.15792  93.61056  90.67634 107.98288  93.72856  93.11586 114.25064
#>  [29]  96.89832  85.21415 103.60718 118.07402  92.29831 116.30787  96.94046
#>  [36]  88.75006 110.70093 106.80362 106.80181  78.45343  90.59212 113.49160
#>  [43] 107.58402 105.77168  97.74529  92.92667  87.12961  97.34649 103.17341
#>  [50] 114.52780 114.82291  84.09064  97.41627  80.09692 112.52924  84.14193
#>  [57] 105.79051  92.79212  77.79175  94.06701  91.08944 102.43396 100.58815
#>  [64] 112.30860  93.74515 100.52105 103.26004 107.44203  97.91168 119.01198
#>  [71]  86.81093  95.02666  97.24043  78.01471 105.61307 103.25924 100.08636
#>  [78] 111.09707 127.78743  87.27984 123.72900  97.47131 102.77547  87.47706
#>  [85]  94.13426  96.19866 118.04711 105.96198 114.36962 115.87495 115.10900
#>  [92] 108.80649 109.96885 111.57981  94.25167  87.46057 106.31133 109.05409
#>  [99] 107.89903 114.14477
#> 
#> $distribution
#> [1] "KAP"
#> 
#> $method
#> [1] "L-moments"
#> 
#> $params
#> [1] 95.4862623 13.2031444  0.3010056  0.1682830
#>