Learn R Programming

ffaframework (version 0.1.0)

data_decomposition: Decompose Annual Maximum Series

Description

Decomposes a nonstationary annual maxima series to derive its stationary stochastic component, which can be used to identify a best-fit distribution using conventional stationary methods, like those based on L-moments. The decomposition procedure follows that proposed by Vidrio-Sahagún and He (2022), which relies on the statistical representation of nonstationary stochastic processes.

Usage

data_decomposition(data, ns_years, ns_structure)

Value

Numeric vector of decomposed data.

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.

Details

Internally, the function does the following:

  1. If there is a trend in the location, fit Sen's trend estimator and subtract away the fitted trend.

  2. If there is a trend in the scale, estimate the variability of the data with data_mw_variability(), fit Sen's trend estimator to the variability vector, and rescale the data to remove the trend.

  3. If necessary, shift the data so that its minimum is at least 1.

References

Vidrio-Sahagún, C. T., and He, J. (2022). The decomposition-based nonstationary flood frequency analysis. Journal of Hydrology, 612 (September 2022), 128186. tools:::Rd_expr_doi("10.1016/j.jhydrol.2022.128186")

See Also

data_mw_variability(), eda_sens_trend()

Examples

Run this code
data <- rnorm(n = 100, mean = 100, sd = 10)
ns_years <- seq(from = 1901, to = 2000)
ns_structure <- list(location = TRUE, scale = FALSE)
data_decomposition(data, ns_years, ns_structure)

Run the code above in your browser using DataLab