spatialEco (version 1.3-2)

raster.kendall: Kendall tau trend with continuity correction for raster time-series

Description

Calculates a nonparametric statistic for a monotonic trend based on the Kendall tau statistic and the Theil-Sen slope modification

Usage

raster.kendall(
  x,
  intercept = FALSE,
  p.value = FALSE,
  z.value = FALSE,
  confidence = FALSE,
  tau = FALSE,
  ...
)

Arguments

x

A rasterStack object with at least 5 layers

intercept

(FALSE/TRUE) return a raster with the pixel wise intercept values

p.value

(FALSE/TRUE) return a raster with the pixel wise p.values

z.value

(FALSE/TRUE) return a raster with the pixel wise z.values

confidence

(FALSE/TRUE) return a raster with the pixel wise 95 pct confidence levels

tau

(FALSE/TRUE) return a raster with the pixel wise tau correlation values

...

Additional arguments passed to the raster overlay function

Value

Depending on arguments, a raster layer or rasterBrick object containing:

  • raster layer 1 slope for trend, always returned

  • raster layer 2 intercept for trend if intercept TRUE

  • raster layer 3 p value for trend fit if p.value TRUE

  • raster layer 4 z value for trend fit if z.value TRUE

  • raster layer 5 lower confidence level at 95 pct, if confidence TRUE

  • raster layer 6 upper confidence level at 95 pct, if confidence TRUE

  • raster layer 7 Kendall's tau two-sided test, reject null at 0, if tau TRUE

Details

This function implements Kendall's nonparametric test for a monotonic trend using the Theil-Sen (Theil 1950; Sen 1968; Siegel 1982) method to estimate the slope and related confidence intervals.

References

Theil, H. (1950) A rank invariant method for linear and polynomial regression analysis. Nederl. Akad. Wetensch. Proc. Ser. A 53:386-392 (Part I), 53:521-525 (Part II), 53:1397-1412 (Part III).

Sen, P.K. (1968) Estimates of Regression Coefficient Based on Kendall's tau. Journal of the American Statistical Association. 63(324):1379-1389.

Siegel, A.F. (1982) Robust Regression Using Repeated Medians. Biometrika, 69(1):242-244

See Also

kendallTrendTest for model details

overlay for available ... arguments

Examples

Run this code
# NOT RUN {
 library(raster)
 r.logo <- stack(system.file("external/rlogo.grd", package="raster"),
                 system.file("external/rlogo.grd", package="raster"),
 			    system.file("external/rlogo.grd", package="raster")) 
 
 # Calculate trend slope with p-value and confidence level(s)
 # ("slope","intercept", "p.value","z.value", "LCI","UCI","tau")
   k <- raster.kendall(r.logo, p.value=TRUE, z.value=TRUE, 
                       intercept=TRUE, confidence=TRUE, 
                       tau=TRUE)
     plot(k)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab