mk_test: mk_test

Description Usage Arguments Details Value

View source: R/main.R

Description

mk_test performs a Mann-Kendall Test and return multiple test statistics given a variable y and a variable x in vector form.

Usage

1
mk_test(y_var, x_var, z_low = 0.52, z_high = 1.28, keep_z = FALSE)

Arguments

y_var

a vector of numerics representing the y variable

x_var

a vector of numerics representing the x variable

z_low

a numeric representing the z-value for the lower confidence level, defaulted to 0.52 representing the 70 percent confidence threshold

z_high

a numeric representing the z-value for the upper confidence level, defaulted to 1.28 representing the 90 percent confidence threshold

keep_z

a boolean for whether or not z-value will be included, defaulted to FALSE

Details

1. y and x variables should have equal length 2. Although the function does allow input y to contain duplicates of a certain value, please take into account that an excess amount of duplicates within y will likely decrease the accuracy of the result generated by the Mann-Kendall test. For data set with too many ties in the dependant variable, consider testing for the trend using alternative methods, such as generalized linear model. Refer to other functions such as hurdle_test and negbin below for more information.

Value

a dataframe of the form || slope || intercept || ConfidenceLevel || z_value ||


sarahforte/CESIfun documentation built on Dec. 22, 2021, 10:16 p.m.