# Test of Monotonicity by Calibrating for Linear Functions

##### Posted on (Update: )

The bandwidth test will generally perform well if the regression function does not have any flat or nearly flat parts,

Let $0 \le r\le s-2\le n-2$ be integers, let $a, b$ be constants and put

\[S(a, b\mid r,s) = \sum_{i=r+1}^s[Y_i-(a+bx_i)]^2\]For each choice of $(r, s)$, define $\hat a = \hat a(r, s)$ and $\hat b = \hat b(r, s)$ by

\[(\hat a, \hat b) = \argmin_{(a, b)} S(a, b\mid r, s)\]