Learn R Programming

SurrogateParadoxTest (version 2.0)

monotonicity_test: Monotonicity test

Description

Runs the test of monotonicity for a regression function.

Usage

monotonicity_test(X, Y, h = NA, m = 5, bootstrap_n = 100, 
alpha = 0.05)

Value

T_m_value

Value of the test statistic.

p_val

p-value of test

reject

whether the test rejects the null

T_m_samples

Vector of bootstrapped values of test statistic

Arguments

X

Vector of X values.

Y

Vector of Y values.

h

Bandwidth for the kernel smoother.

m

Window size to calculate linear regression.

bootstrap_n

Desired number of bootstrap samples.

alpha

Desired alpha level of the test.

Author

Emily Hsiao

References

Hall, Peter, and Nancy E. Heckman. "Testing for monotonicity of a regression mean by calibrating for linear functions." Annals of Statistics (2000): 20-39.