mann_kendall: Mann-Kendall Trend Test

View source: R/trends.R

mann_kendallR Documentation

Mann-Kendall Trend Test

Description

Performs the Mann-Kendall trend test. This function is a wrapper around mk.test. See documentation there for more details about the calculation

Usage

mann_kendall(x, alternative = c("greater", "two.sided", "less"),
  continuity = TRUE)

Arguments

x

a vector of class "numeric" or a time series object of class "ts"

alternative

the alternative hypothesis, defaults to two.sided

continuity

logical, indicates whether a continuity correction should be applied, defaults to TRUE.

Value

a tidy data frame with the test results

Examples

x <- runif(100) * 1:100
mann_kendall(x, alternative = "two.sided")

StatisticsNZ/er.helpers documentation built on Oct. 2, 2023, 7:24 a.m.