Theil-Sen Calculator

slope
contrast
chart
clear all

Results

remove
clear all
download all
id Label Theil-Sen SE-Slope Z P Value CI 85% CI 90%
Theil-Sen trend:
Trend difference test:

The Theil-Sen slope (Sen, 1968; Theil, 1950), also known as “Kendall’s slope” or the “Nonparametric linear regression slope”, is an alternative to the standard linear regression slope. The Theil-Sen slope is popular in the earth sciences (meteorology, hydrology, ecology, climatology) for measuring over time such phenomena as air and water quality and glacial retreat. The Theil-Sen slope can be represented by a straight line, but, like Koenig’s bi-split (Koenig, 1972) and Tukey’s tri-split slopes (Tukey, 1977), it is “distribution free” and permits use of merely ordinal measurement scales. The Theil-Sen has relatively strong power/precision, greater than both the Koenig and Tukey nonparametric slopes, and (Johnson and Velleman, 1985). When data meet all parametric assumptions, Theil-Sen has about 91% Pitman efficiency of linear regression, and when data are very non-normal and skewed, Theil-Sen efficiency can exceed (1.27 times) that of linear regression Armitage et al, 2002; Helsel & Hirsch, 1992; Sheskin, 2007; Sprent & Smeeton, 2007). The most common significance test for the Theil-Sen slope is that used for Kendall’s Tau Rank Order, calculated from the same data (Hollander & Wolfe, 1999). The Theil-Sen slope is not commonly offered by most statistics packages. Alternatives include: 1) KTRLine Version 1.0, (Granato, 2006), downloadable from the US Geological Survey Office. 2) the free open-source “R” stats program, includes Theil-Sen within its “mblm” package at: . 3) the Minitab macro: “SENSLOPE.MAC” (Akritas, C., 2004). 4) StatsDirect (2008), an inexpensive program with many nonparametric tests designed for medical researchers. This web-page calculates the Theil-Sen slope for a single phase, and also compares slopes from two phases. Significance tests are based on corresponding Kendall’s Tau. Standard Errors are estimated based on transformed Kendall’s Tau standard errors.
  1. Data are input in up to ten windows at the page top, each headed by a label box and a selection check.
  2. Type or paste data from just one phase in each input window, and label each phase above, e.g. A1, B3, 2A1, etc.
  3. You may calculate Theil-Sen slope for a single phase, or may contrast slopes from two phases. Choose one of these options by clicking the Slope button or the Contrast button at top of the page.
  4. 4. Results are provided, for individual slopes, and, if selected, for their differences.
  5. Note 1: The standard errors used in this program are calculated from the Tau/SEtau ratios for each phase. Other Theil-Sen statistics packages do rely on the Tau Z scores and p-values, but do not interpolate the standard error from the Tau ratio, as we do here.
  6. Note 2: The test of difference between slopes is calculated by student t, with df=N-2. The denominator is the square root of the sum of the two variances: sqrt(Var1+Var2).