These functions are all case functions and have to do with the order of cases in the collection.
prev( a ) |
The value for a from the previous case. If this is the first case, prev gives 0. |
prev( a, default) prev( a, default, filter) |
Optional arguments for prev( ). The default value is what prev( ) returns for the first case. So you can make factorials in an attribute named fact with a formula of caseIndex * prev( fact, 1) filter is subtle. If it's present, prev will return the value from the first case before the current case for which filter is true. |
next( a ) |
The value for a from the next case. If this is the last case, next gives 0. Optional arguments are the same as for prev( ). |
rank( a ) |
The "place" of this case if the collection were sorted by a. Identical values get the same rank. |
uniqueRank( a) |
Like rank( ), above, except that this returns a unique value for each case in the collection (i.e., it breaks ties). |
runLength( a ) |
This one's wild! It gives the number of identical
values immediately prior to and including the current value. |
bin( a, bin, min, max) |
Gives you a string (category value) for a - its bin
as defined by the other arguments. The last two arguments are optional. |
zScore( x ) sampleZScore( x ) |
The z-score of the value, that is, the difference
between it and the mean divided by the standard deviation. This is the
same as These two are synonyms. |
popZScore( x ) |
Just like zScore( ) (above) except calculated with n in the denominator (i.e., it assumes we have the population and not a sample of it) |