kendall_Z_adjusted: Mann-Kendall correlation test, unadjusted and adjusted for...

View source: R/kendall_Z_adjusted.R

kendall_Z_adjustedR Documentation

Mann-Kendall correlation test, unadjusted and adjusted for autocorrelation, with P-values

Description

Mann-Kendall correlation test, unadjusted and adjusted for autocorrelation, with P-values

Usage

kendall_Z_adjusted(x, ...)

Arguments

x

numeric, a time series

...

optional arguments to "acf", eg. lag.max (see sample_size_ratio)

Value

list: unadjusted and adjusted Z statistics, effective sample size ratio, unadjusted and adjusted P-values

Author(s)

Ken Butler, butler@utsc.utoronto.ca

Examples

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


nxskok/mkac documentation built on Jan. 15, 2024, 4:02 a.m.