Learn R Programming

wq (version 0.4.6)

seaKen: Seasonal and Regional Kendall trend test

Description

Calculates the Seasonal or Regional Kendall test of significance, including an estimate of the Sen slope.

Usage

seaKen(x, plot = FALSE, type = c("slope", "relative"), order = FALSE, 
         pval = .05, mval = .5, pchs = c(19, 21), ...)

Arguments

Value

A list of the following if x is a vector: 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 yearsor a matrix with corresponding columns if x is a matrix or data frame.

Rdversion

1.1

Details

The Seasonal Kendall test (Hirsch et al. 1982) is based on the Mann-Kendall tests for the individual seasons (see mannKen). p-values provided here are not corrected for serial correlation among seasons.

If plot = TRUE, then either the Sen slope (type = "slope") or the relative Sen slope (type = "relative") are plotted. Plotting the relative slope is useful when the variables in x have different units. The plot symbols indicate, respectively, that the trend is significant or not significant. The plot can be customized by passing any arguments used by dotchart such as xlab, as well as graphical parameters described in par.

If mval or more of the seasonal slope estimates are missing, then that trend is considered to be missing. The seasonal slope estimate (mannKen), in turn, is missing if half or more of the possible comparisons between the first and last 20% of the years are missing.

The function can be used in conjunction with mts2ts to calculate a Regional Kendall test of significance for annualized data, along with a regional estimate of trend (Helsel and Frans 2006). See the examples below.

References

Helsel, D.R. and Frans, L. (2006) Regional Kendall test for trend. Environmental Science and Technology 40(13), 4066-4073.

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.

See Also

mannKen, mts2ts, trendHomog

Examples

Run this code
# Seasonal Kendall test:
chl <- sfbayChla # monthly chlorophyll at 16 stations in San Francisco Bay
seaKen(sfbayChla[, 's27']) # results for a single series at station 27
seaKen(sfbayChla) # results for all stations
seaKen(sfbayChla, plot=TRUE, type="relative", order=TRUE)

# Regional Kendall test:
# Use mts2ts to change 16 series into a single series with 16 "seasons"
seaKen(mts2ts(chl))  # too many missing data
seaKen(mts2ts(chl, seas = 2:4)) # better when just Feb-Apr, spring bloom period,
                                # but last 4 stations still missing too much.
seaKen(mts2ts(chl[, 1:12], 2:4)) # more reliable result

Run the code above in your browser using DataLab