Ranks Class |
Namespace: Imsl.Stat
The Ranks type exposes the following members.
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
ExpectedNormalOrderStatistic |
Returns the expected value of a normal order statistic.
| |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetBlomScores |
Gets the Blom version of normal scores for each observation.
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetNormalScores |
Gets the expected value of normal order statistics (for tied
observations, the average of the expected normal scores).
| |
GetRanks |
Gets the rank for each observation.
| |
GetSavageScores |
Gets the Savage scores. (the expected value of exponential order statistics)
| |
GetTukeyScores |
Gets the Tukey version of normal scores for each observation.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetVanDerWaerdenScores |
Gets the Van der Waerden version of normal scores for each
observation.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
Fuzz |
The fuzz factor used in determining ties.
| |
Random |
The Random object.
| |
TieBreaker |
The tie breaker for Ranks.
|
The class Ranks can be used to compute the ranks, normal scores, or exponential scores of the data in X. Ties in the data can be resolved in four different ways, as specified by property TieBreaker. The type of values returned can vary depending on the member function called:
GetRanks: Ordinary Ranks
For this member function, the values output are the ordinary ranks of the data in X. If X[i] has the smallest value among those in X and there is no other element in X with this value, then GetRanks(i) = 1. If both X[i] and X[j] have the same smallest value, then
if TieBreaker = 0, Ranks[i] = GetRanks([j] = 1.5
if TieBreaker = 1, Ranks[i] = Ranks[j] = 2.0
if TieBreaker = 2, Ranks[i] = Ranks[j] = 1.0
if TieBreaker = 3, Ranks[i] = 1.0 and Ranks[j] = 2.0
or Ranks[i] = 2.0 and Ranks[j] = 1.0.
GetBlomScores: Normal Scores, Blom Version
Normal scores are expected values, or approximations to the expected values, of order statistics from a normal distribution. The simplest approximations are obtained by evaluating the inverse cumulative normal distribution function, Cdf.InverseNormal, at the ranks scaled into the open interval (0, 1). In the Blom version (see Blom 1958), the scaling transformation for the rank , where n is the sample size is . The Blom normal score corresponding to the observation with rank is
where is the normal cumulative istribution function.
Adjustments for ties are made after the normal score transformation. That is, if X[i] equals X[j] (within fuzz) and their value is the k-th smallest in the data set, the Blom normal scores are determined for ranks of k and k + 1, and then these normal scores are averaged or selected in the manner specified by TieBreaker, which is set by the property TieBreaker. (Whether the transformations are made first or ties are resolved first makes no difference except when averaging is done.)
GetTukeyScores: Normal Scores, Tukey Version
In the Tukey version (see Tukey 1962), the scaling transformation for the rank is . The Tukey normal score corresponding to the observation with rank is
Ties are handled in the same way as discussed above for the Blom normal scores.
GetVanDerWaerdenScores: Normal Scores, Van der Waerden Version
In the Van der Waerden version (see Lehmann 1975, page 97), the scaling transformation for the rank is . The Van der Waerden normal score corresponding to the observation with rank is
Ties are handled in the same way as discussed above for the Blom normal scores.
GetNormalScores: Expected Value of Normal Order Statistics
The member function GetNormalScores returns the expected values of the normal order statistics. If the value in X[i] is the k-th smallest, then the value output in SCORE[i] is , where is the expectation operator and is the k-th order statistic in a sample of size x.length from a standard normal distribution. Ties are handled in the same way as discussed above for the Blom normal scores.
GetSavageScores: Savage Scores
The member function GetSavageScores returns the expected values of the exponential order statistics. These values are called Savage scores because of their use in a test discussed by Savage (1956) (see Lehman 1975). If the value in X[i] is the k-th smallest, then the i-th output value output is , where is the k-th order statistic in a sample of size n from a standard exponential distribution. The expected value of the k-th order statistic from an exponential sample of size n is
Ties are handled in the same way as discussed above for the Blom normal scores.