Non-parametric test for monotonic seasonal trends
sk_seasonal(swmpr_in, ...)# S3 method for swmpr
sk_seasonal(swmpr_in, param = NULL, alpha = 0.05,
data_min = 5, envStats_summary = FALSE, stat_lab = "Average",
FUN = function(x) mean(x, na.rm = TRUE), ...)
input swmpr object
additional arguments passed to other methods. See assign_season
chr string of variable to plot
num, alpha value to use to significance test. Defaults to 0.05.
num, the minimum number of observations required to perform the analysis. Defaults to 5
logical, should the standard EnvStats::kendallSeasonalTrendTest
be returned? Defaults to FALSE
. See Details for more information.
chr, label for the summary statistic defined in FUN
. Defaults to "Average".
function used to aggregate seasonal SWMP data.
Returns a data.frame
object or a summary from EnvStats::kendallSeasonalTrendTest
This function performs a seasonal kendall test on seasonally aggregated values using kendallSeasonalTrendTest
.
Data are aggregated on a user-specified seasonal basis using the FUN
argument. For example, using default settings, sk_seasonal
would perform a seasonal kendall test on average monthly values. However, if the user set FUN = min(x, na.rm = T)
then a seasonal kendall would be performed on monthly minimum values.
If EnvStats_summary = T
then the detailed output summary from kendallSeasonalTrendTest
will be returned. If EnvStats_summary = F
then an abbreviated summary will be returned in a data.frame
. The abbreviated summary contains the station name, the type of statistic used to summarize the data on a seasonal basis (specified by stat_lab
), and the following results from kendallSeasonalTrendTest
: tau, slope, p-value for the chi-square test, and the p-value for the trend test.
# NOT RUN {
dat_wq <- elksmwq
dat_wq <- qaqc(dat_wq, qaqc_keep = c(0, 3, 5))
x <- sk_seasonal(dat_wq, param = 'temp')
# }
Run the code above in your browser using DataLab