View source: R/kendall_Z_adjusted.R
kendall_Z_adjusted | R Documentation |
Mann-Kendall correlation test, unadjusted and adjusted for autocorrelation, with P-values
kendall_Z_adjusted(x, ...)
x |
numeric, a time series |
... |
optional arguments to "acf", eg. lag.max (see sample_size_ratio) |
list: unadjusted and adjusted Z statistics, effective sample size ratio, unadjusted and adjusted P-values
Ken Butler, butler@utsc.utoronto.ca
set.seed(457299)
x=rnorm(100) # uncorrelated (no adjustment needed)
x=x+0.02*(1:100) # with trend
kendall_Z_adjusted(x)
# ar(1) data
set.seed(457298)
xx=stats::arima.sim(list(ar=0.8),100) # autocorrelated, needs adjusting
kendall_Z_adjusted(xx)
# P-value adjusted is much less significant
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.