# RemoveOutlierByRange

Advanced Analysis Library Only

AnalysisLibErrType RemoveOutlierByRange (double arrayX[], double arrayY[], double weight[], int *numberOfElements, int rangeType, double range[], int rangeLength, int outlierIndices[], int *numberOfOutlierIndices);

## Purpose

Removes the outliers according to the input range.

## Parameters

Input
Name | Type | Description
rangeType | integer | The range type. rangeType must be one of the following values: RANGE_OF_Y (0) RANGE_OF_X (1) RANGE_OF_X_AND_Y (2)
range | double-precision array | Contains the upper and lower limits of the range.
rangeLength | integer | The length of range. rangeLength must be 2 if rangeType is RANGE_OF_Y or RANGE_OF_X. rangeLength must be 4 if rangeType is RANGE_OF_X_AND_Y.
Output
Name | Type | Description
arrayX | double-precision array | On input, arrayX is the array of x values. On output, arrayX is the array of x values with the outliers removed.
arrayY | double-precision array | On input, arrayY is the array of y values. On output, arrayY is the array of y values with the outliers removed.
weight | double-precision array | On input, weight is the array of weights. On output, weight is the array of weights with the outliers removed. If weight is NULL, the function does not change weight.
numberOfElements | integer | On input, numberOfElements specifies the number of observations in arrayX, arrayY, and weight. On output, numberOfElements specifies the number of remaining observations in arrayX, arrayY, and weight after the outlier observations are removed.
outlierIndices | integer array | The indices of the outliers.
numberOfOutlierIndices | integer | On input, numberOfOutlierIndices specifies the length of outlierIndices. On output, numberOfOutlierIndices is the actual number of outliers found. If the length of outlierIndices is not sufficient to store the indices of the found outliers, the function returns the error -20010.

## Return Value

Name | Type | Description
status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants.