stratifiedMannKendall: Compute stratified Mann-Kendall trend tests

Description Usage Arguments Value Author(s) See Also Examples

View source: R/stratifiedMannKendall.R

Description

In contrast to most existing implementations, this function allows you to apply pixel-based Mann-Kendall trend tests not only to a raw 'RasterStack' of time series observations, but also to stratified subsets of the very same, i.e., across monthly (Jan-Dec) and seasonal ('DJF', 'MAM', 'JJA', 'SON') chunks of layers.

Usage

1
2
3
4
5
6
7
stratifiedMannKendall(
  x,
  type = c("raw", "monthly", "seasonal"),
  p = 0.001,
  prewhitening = TRUE,
  cores = 1L
)

Arguments

x

A 'RasterStack' consisting of consecutive time series observations.

type

'character'; one of 'raw' (take the input series as is), 'monthly' (Mann-Kendall test across unique months) and 'seasonal' (Mann-Kendall test across unique seasons).

p

Significance level to be tested.

prewhitening

'logical'. If TRUE, pre-whitening is applied prior to the actual Mann-Kendall trend test.

cores

Number of cores for parallel processing.

Value

A 'Raster*' object.

Author(s)

Florian Detsch

See Also

significantTau, confint.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
## overall trend
overall_trend = stratifiedMannKendall(baleCHIRPS.v2, p = 1)
spplot(overall_trend)

## monthly trend
monthly_trend = stratifiedMannKendall(baleCHIRPS.v2, type = "monthly", p = 0.05)
names(monthly_trend) = month.abb
spplot(monthly_trend)

## seasonal trend
seasons_trend = stratifiedMannKendall(baleCHIRPS.v2, type = "seasonal", p = 0.05)
names(seasons_trend) = c("DJF", "MAM", "JJA", "SON")
spplot(seasons_trend)

## End(Not run)

environmentalinformatics-marburg/heavyRain documentation built on Sept. 1, 2020, 9:53 a.m.