Learn R Programming

wq (version 0.2-9)

seaKen: Seasonal Kendall test

Description

Calculates the Seasonal Kendall test of significance for seasonal time series, including an estimate of the Sen slope.

Usage

seaKen(x)

seaRoll(x, w = 5, rule = 2)

Arguments

Value

seaKen returns a list with the following members:sen.slopeSen slopesen.slope.pctSen slope as percent of meanp.valuesignificance of slopemissfor each season, the fraction missing of slopes connecting first and last 20% of the yearsseaRoll returns a matrix with one row per time window containing the Sen slope, the corresponding percent, and the p-value. Rows are labelled with the final year of the window.

Rdversion

1.1

Details

The Seasonal Kendall tests were introduced by Hirsch et al. (1982) and are further described by Helsel and Hirsch (2002). The p-values provided here are the raw values, not the ones corrected for serial correlation among seasons. In any case, the raw values are recommended for series lengths less than 10 years. But consider using smaller pvalues than usual as a threshold for significance.

The function seaRoll applies seaKen to rolling time windows of width w. A minimum w of five years is required. The only rules currently implemented are: (1) ignore missing data; and (2) report a result only if more than half the seasons are each missing less than half the possible comparisons between the first and last 20% of the years (Schertz et al. [1991] discuss these and related decisions about missing data).

References

Helsel, D.R. and Hirsch, R.M. (2002) Statistical methods in water resources. Techniques of Water Resources Investigations, Book 4, chapter A3. U.S. Geological Survey. 522 pages. http://pubs.usgs.gov/twri/twri4a3/

Hirsch, R.M., Slack, J.R., and Smith, R.A. (1982) Techniques of trend analysis for monthly water quality data. Water Resources Research 18, 107-121.

Schertz, T.L., Alexander, R.B., and Ohe, D.J. (1991) The computer program EStimate TREND (ESTREND), a system for the detection of trends in water-quality data. Water-Resources Investigations Report 91-4040, U.S. Geological Survey.

Examples

Run this code
chl27 <- sfbayChla[, 's27']
seaKen(chl27)
seaRoll(chl27)

Run the code above in your browser using DataLab