MKendall: Mann-Kendall test for trend using block bootstrap

Description Usage Arguments References Examples

Description

Return the Mann-Kendall test for trends. In case of autocorrelation, the p-value of the test is obtained by block bootstrap. This function is a wrapper for the function MannKendall. If not specified by block, an automatic selection of the block sizes is provided according to the largest significant autocorrelation lag.

Usage

1
2
MKendall(x, block = NULL, block.max = 5, nboot = 1000,
  acf.ci = 0.95, acf.tol = 1, acf.transf = TRUE, ...)

Arguments

x

Sample.

block

Size of the bootstrap blocks. If block is NULL it is automatically selected

block.max

Maximal size for for block if selected automatically.

acf.tol

Value added to the largest significant autocorrelation to determine the block size.

...

Other parameters pass to tsboot.

nsim

Number of bootstrap sample.

acf.alpha

Determine the p-value of a significant autocorrelation.

References

Önöz, B., Bayazit, M. (2012). Block bootstrap for Mann–Kendall trend test of serially dependent data. Hydrol. Process. 26, 3552–3560. https://doi.org/10.1002/hyp.8438

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
set.seed(1)

## Case of independant data.
x <- rlnorm(100, 5, .1)
MKendall(x, block = 0)

## Case of autocorrelated data without trend.
x<- rep(0,100)
for(ii in seq_along(x)[-1])
  x[ii] <- 0.5 * x[ii-1] + rnorm(1,0,sd=15)

acf(x)
MKendall(x, block = 2)
MKendall(x)

## Case with autocorrelation with trend
MKendall(x+seq_along(x)/3)

martindurocher/floodStat documentation built on May 31, 2019, 12:42 a.m.