mann_kendall | R Documentation |
Performs Mann-Kendall non-parametric test for trend.
mann_kendall(x, t = seq_along(x), type = c("both", "increasing", "decreasing"))
## S3 method for class 'mann_kendall'
test_statistic(x, ...)
## S3 method for class 'mann_kendall'
p_value(x, ...)
x |
numeric vector representing a time-series. |
t |
time index (a numeric vector, or a vector
of class |
type |
direction to test (both, increasing, or decreasing). |
... |
further arguments passed to or from other methods. |
object of class Mann-Kendall
.
test_statistic(mann_kendall)
: Extracts Mann Kendall tau
p_value(mann_kendall)
: Extract p-value
test_statistic
, p_value
,
cor.test
, regional_kendall
# create mann_kendall object
mk <- mann_kendall(c(9, 4, 7, 5, 3), type = "decreasing")
mk <- mann_kendall(
x = c(9, 4, 7, 5, 3),
t = c(1, 3, 2, 5, 9),
type = "decreasing")
# get test statistic tau
test_statistic(mk)
# get p-value
p_value(mk)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.