Selects the best-fit distribution by comparing a bias-corrected Z-statistic for the sample L-kurtosis (\(\tau_4\)) against the theoretical L-moments for a set of candidate distributions. The distribution with the smallest absolute Z-statistic is selected.
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.
select_zstatistic(data, ns_years = NULL, ns_structure = NULL, samples = 10000L)
A list with the results of distribution selection:
method
: "Z-selection"
.
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
: List of computed Z-statistics for each candidate distribution.
recommendation
: Name of the distribution with the smallest Z-statistic.
reg_params
: Kappa distribution parameters for the data.
reg_bias_t4
: Bias of the L-kurtosis from the bootstrap.
reg_std_t4
: Standard deviation of the L-kurtosis from the bootstrap.
log_params
: Kappa distribution parameters for the log-transformed data.
log_bias_t4
: Bias of the L-kurtosis from the bootstrap using log_params
.
log_std_t4
: Standard deviation of the L-kurtosis from the bootstrap using log_params
.
Numeric vector of observed annual maximum series values. Must be strictly positive, finite, and not missing.
For NS-FFA only: Numeric vector of observation years corresponding
to data
. Must be the same length as data
and strictly increasing.
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.
Integer scalar. The number of bootstrap samples. Default is 10000.
First, this method fits a four-parameter Kappa distribution to both the original and log-transformed data. Then, bootstrapping is used to estimate the bias and variance of the L-kurtosis. These values, along with the difference between the sample and theoretical L-kurtosis, are used to compute the Z-statistic for each distribution.
Hosking, J.R.M. & Wallis, J.R., 1997. Regional frequency analysis: an approach based on L-Moments. Cambridge University Press, New York, USA.
select_ldistance()
, select_lkurtosis()
, fit_lmoments_kappa()
,
utils_quantiles()
, plot_lmom_diagram()
data <- rnorm(n = 100, mean = 100, sd = 10)
select_zstatistic(data)
Run the code above in your browser using DataLab