Linearly interpolates outlier values based on a logical condition.
OUTLIER(series, condition, endpt)
series 
 
A series. The input series to replace outliers.  
condition 
 
A binary series or logical expression resulting in a binary series. The replacement condition.  
endpt 
 
Optional. An integer specifying end point handling.

A series, or table.
W1: {1, 3, 9, 1, 2}
W2: outlier(W1, W1 > 3)
W2 contains the series {1, 3, 2, 1, 2}.
Any value in W1 greater than 3.0 is replaced with the linear interpolation
of the preserved neighbors. In this case,
W3: {1, 3, 9, 13, 10, 1, 2}
W4: outlier(W3, W3 > 3);overp(W3, lred);setsym(14)
Similar to above, except multiple consecutive outliers are replaced with the linear interpolation of the preserved neighboring values. The original data is overplotted onto the result to clearly show the process of outlier interpolation.
W1: {1, 3, 9, 13, 10}
W2: outlier(W1, W1 > 3)
W3: outlier(W1, W1 > 3, 0)
W2 contains the series {1, 3, 3, 3, 3}
but W3 contains the series
OUTLIER uses XYLOOKUP to replace removed outlier values with the linear interpolation of the surrounding preserved values. A value is an outlier if it meets the condition specified by the binary series condition.
Consecutive outlier values are replaced with the continued linear interpolation of the preserved neighboring values.
If endpt is 1, removed values at the beginning of the series are replaced with the first preserved values and removed values at the end of the series are replaced with the last preserved value.
If endpt is 0, removed beginning and ending values are not replaced and the resulting series is shorter than the original input series.