significantTau: Compute (Pre-Whitened) Kendall's tau

Description Usage Arguments Value References See Also Examples

Description

Apply the Mann-Kendall trend test (Mann, 1945) to a series of observations and return Kendall's τ (Kendall, 1938) based on a predefined significance level. In contrast to other readily available implementations, it is left to the user to decide whether or not to apply pre-whitening as described in the zyp package vignette (Bronaugh and Werner, 2013).

Usage

1
2
3
4
5
6
7
8
## S4 method for signature 'numeric'
significantTau(x, p = 0.001, prewhitening = TRUE,
  method = c("yuepilon", "zhang"), df = FALSE)

## S4 method for signature 'RasterStackBrick'
significantTau(x, p = 0.001,
  prewhitening = TRUE, method = c("yuepilon", "zhang"), filename = "",
  ...)

Arguments

x

Either a Raster* object or a numeric vector.

p

numeric, defaults to 0.001. Significance level to be tested.

prewhitening

logical. If TRUE (default), pre-whitening is applied prior to the Mann-Kendall trend test.

method

character. The prewhitening method to apply, see zyp.trend.vector.

df

logical, defaults to FALSE. If TRUE, a data.frame holding the value of Kendall's τ and the referring significance level.

filename

character. Optional output filename.

...

Further arguments passed to writeRaster.

Value

References

Kendall, M.G. (1938). A new measure of rank correlation. Biometrika 30(1/2), 81-93, doi: 10.2307/2332226. Available online at http://www.jstor.org/stable/2332226 (accessed 2015-11-06).

Mann, H.B. (1945). Nonparametric tests against trend. Econometrica 13(3), 245-259, doi: 10.2307/1907187. Available online at http://www.jstor.org/stable/1907187 (accessed 2015-11-06).

Zhang, X., Vincent, L.A., Hogg, W.D. and A. Niitsoo (2000). Temperature and Precipitation Trends in Canada during the 20th Century. Atmosphere-Ocean 38(3), 395-429, doi: 10.1080/07055900.2000.9649654. Available online at http://www.tandfonline.com/doi/abs/10.1080/07055900.2000.9649654 (accessed 2015-11-06).

Yue, S., Pilon, P., Phinney, B. and G. Cavadias (2002). The influence of autocorrelation on the ability to detect trend in hydrological series. Hydrological Processes 16, 1807-1829, doi: 10.1002/hyp.1095. Available online at http://onlinelibrary.wiley.com/doi/10.1002/hyp.1095/abstract (accessed 2015-11-06).

See Also

MannKendall, zyp.trend.vector.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
## Example taken from ?Kendall::MannKendall
library(Kendall)
data(PrecipGL)
plot(PrecipGL)

## Mann-Kendall trend test without pre-whitening
x <- as.numeric(PrecipGL)
significantTau(x, p = 0.001, prewhitening = FALSE, df = TRUE)

## Mann-Kendall trend test with pre-whitening
significantTau(x, p = 0.001, prewhitening = TRUE, df = TRUE)

#############################################################################
### use case: significant mann-kendall trends in ndvi3g.v0          #########
#############################################################################

## Not run: 
## Sample data from 1982 to 2013
data("kili3g.v0")
rst <- kili3g.v0[[13:nlayers(kili3g.v0)]]

## Remove seasonal signal
library(remote)
dsn <- deseason(rst, cycle.window = 24)

## Calculate trend-free pre-whitened Mann-Kendall trends (note that
## non-significant pixels are set to NA)
trd <- significantTau(dsn, p = 0.01, prewhitening = TRUE)

library(mapview)
mapview(trd)

## End(Not run)

gimms documentation built on May 29, 2017, 9:37 a.m.