kendallSeasonalTrendTest {WRTDStidal} | R Documentation |
Kendall seasonal trend test
Description
Nonparametric test for monotonic trend Within each season based on Kendall's Tau statistic
Usage
kendallSeasonalTrendTest(y, ...)
## Default S3 method:
kendallSeasonalTrendTest(
y,
season,
year,
alternative = "two.sided",
correct = TRUE,
ci.slope = TRUE,
conf.level = 0.95,
independent.obs = TRUE,
data.name = NULL,
season.name = NULL,
year.name = NULL,
parent.of.data = NULL,
subset.expression = NULL,
...
)
## S3 method for class 'data.frame'
kendallSeasonalTrendTest(y, ...)
## S3 method for class 'formula'
kendallSeasonalTrendTest(y, data = NULL, subset, na.action = na.pass, ...)
## S3 method for class 'matrix'
kendallSeasonalTrendTest(y, ...)
Arguments
y |
an object containing data for the trend test. In the default method, the argument |
... |
methods passed to or from other methods |
season |
numeric or character vector or a factor indicating the seasons in which the observations in y were taken. The length of |
year |
numeric vector indicating the years in which the observations in |
alternative |
character string indicating the kind of alternative hypothesis. The possible values are |
correct |
logical scalar indicating whether to use the correction for continuity in computing the z-statistic that is based on the test statistic S'. The default value is |
ci.slope |
logical scalar indicating whether to compute a confidence interval for the slope. The default value is |
conf.level |
numeric scalar between 0 and 1 indicating the confidence level associated with the confidence interval for the slope. The default value is |
independent.obs |
logical scalar indicating whether to assume the observations in y are seially independent. The default value is |
data.name |
character string indicating the name of the data used for the trend test. The default value is |
season.name |
character string indicating the name of the data used for the season. The default value is |
year.name |
character string indicating the name of the data used for the year. The default value is |
parent.of.data |
character string indicating the source of the data used for the trend test. |
subset.expression |
character string indicating the expression used to subset the data. |
data |
specifies an optional data frame, list or environment (or object coercible by |
subset |
specifies an optional vector specifying a subset of observations to be used. |
na.action |
specifies a function which indicates what should happen when the data contain |
Details
Perform a nonparametric test for a monotonic trend within each season based on Kendall's tau statistic, and optionally compute a confidence interval for the slope across all seasons.
Value
A list object with elements for results of the test
References
Hirsch, R.M., Slack, J.R., Smith, R.A. 1982. Techniques of trend analysis for monthly water quality data. Water Resources Research, 18:107-121.
Millard, S. P. 2013. EnvStats: An R Package for Environmental Statistics. Springer, New York.
Examples
kendallSeasonalTrendTest(res ~ month + year, tidfitmean)