This test computes both the slope (i.e. linear rate of change) and
intercept according to Sen's method. First, a set of linear slopes is
calculated as follows:
$$d_{k} = \frac{x_j - x_i}{j - i}$$
for \(\left(1 \le i < j \le n \right)\), where d
is the slope, x denotes the variable, n is the number of data, and i,
j are indices.
Sen's slope is then calculated as the median from all slopes:
\(b_{Sen} = \textnormal{median}(d_k)\). The
intercepts are computed for each timestep i as given by
$$a_i = x_i - b_{Sen} \times i$$
and the corresponding intercept is as well the median of all
intercepts.
This function also computes the upper and lower confidence limits for
sens slope.