File Exchange

image thumbnail

Theil-Sen Regression with intercept

version 1.0.01 (1.55 KB) by James Harynuk
Based on Arnout Tilgenkamp's Theil_Sen_Regress function, but will determine slope as well as intercept


Updated 13 Apr 2019

View Version History

View License

Super fast and simple Theil-Sen regression. Based on Arnout Tilgenkamp's Theil_Sen_Regress function from 2011. Major difference is that this one returns both a slope and intercept. The original function forced through 0,0 and did not return an intercept.

Cite As

James Harynuk (2021). Theil-Sen Regression with intercept (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

Carolyne Machado

Hello, could you help me with a question? I applied the Mann-Kendall test on a set of data before applying the Theil-Sen estimator. But in some cases, even with a significant trend with the MK test (95% of confidence), the slope was equal to 0. How could this happen?

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: Theil–Sen estimator

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!