The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



TheilSenEstimator


Unit: SDL_statis
Class: none
Declaration: function TheilSenEstimator (DataX, DataY: TDoubleArray; var slope, intercept, slopeLL, slopeUL, iceptLL, iceptUL: double): integer;

The function TheilSenEstimator calculates the robust regression line through the data points given by the arrays DataX and DataY. The variable parameters slope and intercept return Sen's slope and the corresponding intercept. The variable parameters slopeLL and slopeUL return the estimated slope interval for a 95% level of confidence, and the parameters iceptLL and iceptUL return the corresponding intercepts.

The function returns the following error codes:

 0 .... everything is OK
-1 ... sample data has fewer than 3 data points
-2 ... the arrays DataX and DataY do not have the same length
-3 ... the data in DataX does not form a monotonic series
-4 ... warning: data has less than 10 data points (this leads to unreliable estimates of slopeLL, slopeUL, iceptLL and iceptUL


Last Update: 2023-Feb-06