Re: Theil-Sen slope estimator algorithm? [message #77862] |
Fri, 30 September 2011 12:16 |
Russell[1]
Messages: 101 Registered: August 2011
|
Senior Member |
|
|
I'm not sure if this is the same algorithm or not, I doubt that is.
But, this code does do a pretty good job at fitting y(x)=a+b*x, even
when the y values are somewhat scattered (like the graph on the wiki
article).
http://idlastro.gsfc.nasa.gov/ftp/pro/robust/robust_linefit. pro
You'll need to grab a few other things from the IDL Astrolib, so I'd
recommend just getting the whole library at:
http://idlastro.gsfc.nasa.gov/ftp/
the file you need is:
astron.dir.tar.gz
Good luck, Russell
On Sep 30, 10:39 am, Ed Hyer <ejh...@gmail.com> wrote:
> Hello IDL crowd,
>
> I've been reading about this non-parametric estimator, which really
> seems to have many desirable properties for extracting credible
> relationships with uncertainty estimates from noisy datasets:http://en.wikipedia.org/wiki/Theil%E2%80%93Sen_esti mator
>
> Thing is, the algorithm is based on a method that includes the term
> "all pairs of points," which spells trouble. The Wikipedia article
> says there are algorithms more efficient than the O(n-squared) brute
> force method. Anyone know if any of these has been implented in IDL?
>
> Thanks,
>
> --Edward H.
|
|
|