sens.slope | R Documentation |
Computes Sen's slope for linear rate of change and corresponding confidence intervalls
sens.slope(x, conf.level = 0.95)
x |
numeric vector or a time series object of class "ts" |
conf.level |
numeric, the level of significance |
This test computes both the slope (i.e. linear rate of change) and confidence levels 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)
.
This function also computes the upper and lower confidence limits for sens slope.
A list of class "htest".
estimates |
numeric, Sen's slope |
data.name |
character string that denotes the input data |
p.value |
the p-value |
statistic |
the z quantile of the standard normal distribution |
null.value |
the null hypothesis |
conf.int |
upper and lower confidence limit |
alternative |
the alternative hypothesis |
method |
character string that denotes the test |
Current Version is for complete observations only.
Hipel, K.W. and McLeod, A.I. (1994), Time Series Modelling of Water Resources and Environmental Systems. New York: Elsevier Science.
Sen, P.K. (1968), Estimates of the regression coefficient based on Kendall's tau, Journal of the American Statistical Association 63, 1379–1389.
data(maxau)
sens.slope(maxau[,"s"])
mk.test(maxau[,"s"])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.