Runs the test of monotonicity for a regression function.
monotonicity_test(X, Y, h = NA, m = 5, bootstrap_n = 100,
alpha = 0.05)
Value of the test statistic.
p-value of test
whether the test rejects the null
Vector of bootstrapped values of test statistic
Vector of X values.
Vector of Y values.
Bandwidth for the kernel smoother.
Window size to calculate linear regression.
Desired number of bootstrap samples.
Desired alpha level of the test.
Emily Hsiao
Hall, Peter, and Nancy E. Heckman. "Testing for monotonicity of a regression mean by calibrating for linear functions." Annals of Statistics (2000): 20-39.