Rank data with user-specified thresholds
1. rank irng:=col(a) orng:=col(b);
2. rank irng:=col(1) from:=0 to:=3 method:=1 threshold:="0 0.5 0.6 1";
Please refer to the page for additional option switches when accessing the x-function from script
Input
Range
Specifies the input data range.
double
This variable is available only when the method variable is set to 0. It is a positive integer that specifies the number of ranks or levels.
Specifies the first rank. For data points that belong to the first level, the rows in the destination range that correspond to these data points will be filled with the value of this variable.
Specifies the last rank. For data points that belong to the last level, the rows in the destination range that correspond to these data points will be filled with the value of this variable.
int
Specifies whether or not to use user-defined thresholds.
If this variable is 1, you can specify the user-defined thresholds in the Thresholds edit box, and the number of ranks is automatically calculated from the thresholds.
string
This variable is available only when the method variable is set to 1. It specifies the beginning values for the ranks/levels. The thresholds should be separated with space.
This variable is available only when the method variable is set to 0. It specifies the minimum value of the data points that will be ranked. Rows in the output range that correspond to data points less than this value will be set to missing. By default, the minimum value of the input data will be automatically used for this variable. If you want to specify another value, you can uncheck the Auto checkbox and then enter the value in the edit box.
This variable is available only when the method variable is set to 0. It specifies the maximum value of the data points that will be ranked. Rows in the output range that correspond to data points greater than this value will be set to missing. By default, the maximum value of the input data will be automatically used for this variable. If you want to specify another value, you can uncheck the Auto checkbox and then enter the value in the edit box.
Output
Specifies the destination for the output result.
See the syntax here.
This X-Function can be used to decide whether some data points are within certain ranges.
The variables min, max and thresholds determine the ranges. Each data point in the input range is examined. If its value is within a certain range, the corresponding row in the output range will be filled with the rank/level for this range.
Keywords:ranking, classify, classification