Statistica Visual Basic Library of Matrix Functions - VectorRank (Vector, Direction, DupControl)

Parameter Description
Vector name of vector to rank (see Arrays in functions)
Direction direction of rank (SORT_ASCENDING - rank from smallest to largest value, SORT_DESCENDING - rank from largest to smallest value)
DupControl assignment of ranks to duplicate (identical) values (RANK_FIRST, RANK_LAST, RANK_MEAN)

The VectorRank function will rank (assign integer values to) the values in Vector (see Arrays in functions), either from the smallest value to the largest value (SORT_ASCENDING), or from the largest value to the smallest value (SORT_DESCENDING). Parameter DupControl determines how identical (duplicated) values in Vector are handled; if DupControl is set to RANK_FIRST, then the smallest possible rank (for the respective set of identical values) is assigned to each duplicate value in Vector; if DupControl is set to RANK_LAST, then the largest possible rank is assigned to each duplicate value in Vector (tied ranks); if DupControl is set to RANK_MEAN, then the average rank for all duplicate values will be assigned to each duplicate value in Vector (tied ranks).

Related topics
VectorDualSort, VectorSort. For more information on using arrays, see Arrays in functions. For a complete list of matrix functions, see Statistica Visual Basic library of matrix functions.