| calc_annual_stat_trend {HyMETT} | R Documentation |
Calculate trend in annual statistics
Description
Calculate trend in annual statistics
Usage
calc_annual_stat_trend(data = NULL, year, value, ...)
Arguments
data |
'data.frame'. Optional data.frame input, with columns containing |
year |
'numeric' vector when |
value |
'numeric' vector when |
... |
further arguments to be passed to or from |
Details
This function is a wrapper for EnvStats::kendallTrendTest with the passed equation
value ~ year. The returned values include Mann-Kendall test statistic and p-value,
Theil-Sen slope and intercept values, and trend details (Millard, 2013; Helsel and others, 2020).
z_statMann-Kendall test statistic, returned directly from
EnvStats::kendallTrendTestp_valuez_statp-value, returned directly fromEnvStats::kendallTrendTestsen_slopeSen slope in units value per year, returned directly from
EnvStats::kendallTrendTestinterceptSen slope intercept, returned directly from
EnvStats::kendallTrendTesttrend_magTrend magnitude over entire period, in units of
value, calculated assen_slope * (max(year)-min(year))val_beg/endCalculated value at beginning or end of period, calculated as
sen_slope * year + interceptval_perc_changePercentage change over period, calculated as
(val_end - val_beg) / val_beg * 100
Value
A tibble (see tibble::tibble) with test statistic, p-value, trend coefficients, and
trend calculations. See Details.
References
Millard, S.P., 2013, EnvStats: An R Package for Environmental Statistics: New York, New York, Springer, 291 p. [Also available at https://doi.org/10.1007/978-1-4614-8456-1.]
Helsel, D.R., Hirsch, R.M., Ryberg, K.R., Archfield, S.A., and Gilroy, E.J., 2020, Statistical methods in water resources: U.S. Geological Survey Techniques and Methods, book 4, chap. A3, 458 p. [Also available at https://doi.org/10.3133/tm4a3.]
See Also
Examples
calc_annual_stat_trend(data = example_annual, year = "WY", value = "annual_mean")