Description Usage Arguments Value Author(s) References See Also Examples
This function conducts Mann-Kendall trend test from raster time series using "Kendall" package especially designed to handle gappy time series.
1 2 |
rasterts |
Input raster time series as |
rastermask |
Either a |
gapfill |
Character. Defines the algorithm to be used to interpolate pixels with incomplete temporal profiles.
Accepts argument supported as method in function |
cores |
Integer. Defines the number of CPU to be used for multicore processing. Default to "1" core for singlecore processing. |
... |
Additional arguments to be passed through to function |
Object of class MKstack-class
containing the following components:
tau | Kendall tau statistic | |
pvalue | Kendall two-sided p-value | |
score | Kendall Score | |
variance | Variance of Kendall Score | |
Federico Filipponi
Mann, H.B. (1945). Non-parametric tests against trend. Econometrica, 13, 163-171. Kendall, M.G. (1975). Rank Correlation Methods, 4th edition. Charles Griffin, London. Gilbert, R.O. (1987) . Statistical Methods for Environmental Pollution Monitoring. Wiley, NY. Davison, A.C. and Hinkley, D.V. (1997) Bootstrap Methods and Their Application. Cambridge University Press. Hipel, K.W. and McLeod, A.I., (2005). Time Series Modelling of Water Resources and Environmental Systems. Electronic reprint of our book orginally published in 1994. book
MannKendall
, rtsa.stl
, rtsa.seas
, rtsa.gapfill
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
## create raster time series using the 'pacificSST' data from 'remote' package
require(remote)
data(pacificSST)
pacificSST[which(getValues(pacificSST == 0))] <- NA # set NA values
# create rts object
rasterts <- rts(pacificSST, seq(as.Date('1982-01-15'), as.Date('2010-12-15'), 'months'))
## generate raster mask
raster_mask <- pacificSST[[1]] # create raster mask
names(raster_mask) <- "mask"
values(raster_mask) <- 1 # set raster mask values
raster_mask[which(is.na(getValues(pacificSST[[1]])))] <- 0 # set raster mask values
# compute Mann-Kendall trend test
MannKendall_result <- rtsa.mk(rasterts=rasterts, rastermask=raster_mask)
# compute Mann-Kendall trend test using multiple cores on monthly time series
### create monthly averages
rasterts_monthly_mean <- apply.monthly(rasterts, mean)
MannKendall_monhtly_result <- rtsa.mk(rasterts=rasterts_monthly_mean, rastermask=raster_mask)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.