Description
Computes basic non-parametric results from ranked values on one or more arrays.
-
Return Type
-
A McObject object.
A McObject of type mcobjTypeREAL holding an array or matrix of K results for each input array found in ArrayToTest. The result array length, K is max(mcrvfiFirstNtileIndex + NumberOfRanks - 1, mcrvfiFirstNtileIndex), where mcrvfiFirstNtileIndex is 6 (the enum mcobjRankedValuesFieldIndices specifies mcrvfiCount, mcrvfiCountOfMissing, mcrvfiMinimum, mcrvfiMaximum, mcrvfiMedian, mcrvfiAvgDevFromMedian before mcrvfiFirstNtileIndex).
If ArrayToTest is a 1-D array, then the returned result will be single length K array result. If ArrayToTest is an N-dimensioned array (where N is 2 or more), then the returned result will also be an N dimensioned array, where the shape of the results array is identical to the shape of ArrayToTest up to the fastest moving dimension, which is always of size K for the results array.
-
Syntax
-
object.McRankedValues (ArrayToTest, [NumberOfRanks])
The McRankedValues Method syntax has these parts: |
| object | An expression evaluating to an object of type McOMGlobal. | | ArrayToTest | Required. A Variant value. A one or higher dimensioned array of values on which ranked value statistics are to be computed for the fastest-moving dimension. All dimensions except the analyzed one must be one one size.
| | NumberOfRanks | Optional. A Long value. is less than 2, then no N-tiles are appended and only the 6 basic results are returned; this is the default situation.
| Remarks
This method computes basic non-parametric statistics on one or more arrays of values. Optionally, it also computes a specified number of N-tiles (e.g., quartiles or deciles). The results are computed from values sorted (i.e., ranked) from the array to test. For basic parametric statistics, use the McBasicStatistics method.
The results always computed for each input array are: Count of non-missing values, Count of missing values, Minimum value, Maximum value, Median value and Average absolute deviation from the Median. These six values are returned as an array of Double followed by inner N-tiles (numbering NumberOfRanks-1, if NumberOfRanks is greater than 1). The enum mcobjRankedValuesFieldIndices specifies named index values for the 6 base results and an index value for the first of the N-tiles (mcrvfiCount, mcrvfiCountOfMissing, mcrvfiMinimum, mcrvfiMaximum, mcrvfiMedian, mcrvfiAvgDevFromMedian before mcrvfiFirstNtileIndex). The total length of the results will be K=max(mcrvfiFirstNtileIndex+NumberOfRanks-1,mcrvfiFirstNtileIndex); for example, K will be 6+4-1=9 if NumberOfRanks is 4 (the 25, 50 and 75McVectorHistogram:IQL~McOMGlobal~McVectorHistogramMcMissingSingle:IQL~McOMGlobal~McMissingSingle, McMissingDouble:IQL~McOMGlobal~McMissingDouble, and McIsMissingValue:IQL~McOMGlobal~McIsMissingValuemcrvfiCountOfMissing:IQL~mcobjRankedValuesFieldIndices~mcrvfiCountOfMissingmcrvfiCount:IQL~mcobjRankedValuesFieldIndices~mcrvfiCountmcrvfiCount:IQL~mcobjRankedValuesFieldIndices~mcrvfiCount element will be zero, the mcrvfiCountOfMissing:IQL~mcobjRankedValuesFieldIndices~mcrvfiCountOfMissing element will be the length of the source array and all other elements of the returned results array are filled with the McMissingDouble:IQL~McOMGlobal~McMissingDoublemcrvfiCount:IQL~mcobjRankedValuesFieldIndices~mcrvfiCount and mcrvfiCountOfMissing:IQL~mcobjRankedValuesFieldIndices~mcrvfiCountOfMissing% elements.
If a rank result falls between two input values (e.g., as the Median will for any input array with an even number of values), then the result is linearly interpolated from these two values.
|