kensen.test | R Documentation |
Tests for a temporal trend using Kendall's tau and computes the Sen slope estimate of the trend.
kensen.test(y, t, n.min = 10)
y |
the data collected over time. Missing values (NAs) are allowed and removed before computations. |
t |
the time corresponding to each observations in |
n.min |
the minimum number of observations for adjusting the p-value
for serial correlation. Used when |
An object of class "htest" containing the following components:
method |
a description of the method. |
statistic |
the value of Kendall's tau. |
p.value |
the p-value. |
estimate |
a named vector containing the Sen estimate of the slope in units per year, the median value of the data, the median value of time, the number of observations, and if the serial correction is applied, the effective number of observations (n*). |
data.name |
a string containing the actual name of the input series. |
coef |
a vector of an estimate of the intercept and slope. |
alternative |
a character string describing alternative to the test ("two.sided"). |
null.value |
the value for the hypothesized slope (0). |
A straight line of the form
ytrend = sen.slope * ( t - median.time ) + median.data
may be used as a trend line for graphically
portraying or detrending the data. It goes through the point
(t,y) = ( median.time , median.data )
with slope sen.slope.
Many tied values can cause misleading results.
The p-values for uniformly spaced data (t
values unit value like
years) are adjusted for lag-1 autoregressive serial correlation according to
the method described by Yue and Wang (2004) that adjusts for trend. In
keeping with the logic of seaken
, the p-value adjustment is never
performed for fewer than 10 observations. The user can suppress the
adjustment by setting the value of n.min
to Inf
.
Conover, W.J., 1980, Practical nonparametric statistics (2d
ed.): New York, Wiley, 512 p.
Helsel, D.R., and Hirsch, R.M., 2002, Statistical methods in water
resources: U.S. Geological Survey Techniques of Water-Resources
Investigations, book 4, chap. A3, 522 p.
Hirsch, R.M., Alexander, R.B. , and Smith, R.A., 1991, Selection of methods
for the detection and estimation of trends in water quality: Water Resources
Research, v. 27 p. 803–813.
Kendall, M.G., 1938, A new measure of rank correlation: Biometrika v. 30, p.
81–89.
Kendall, M.G., 1976, Rank correlation methods (4th ed.): London, Griffin,
202 p.
Sen, P.K., 1968, Estimates of regression coefficient based on Kendall's tau:
Journal of the American Statisical Association, v. 63, p. 1379–1389.
Yue, S. and Wang. C., 2004, The Mann-Kendall test modified by effective sample size to detect trend in serially correlated hydrological series: Water Resources Management v. 18, p. 201-218.
dectime
, seaken
## Not run: library(smwrData) data(SaddlePeaks) with(SaddlePeaks, kensen.test(Flow, Year)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.