Compute the ranks, normal scores, or exponential scores for a vector of observations.

Namespace: Imsl.Stat
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.0.0

Syntax

C#
[SerializableAttribute]
public class Ranks
Visual Basic (Declaration)
<SerializableAttribute> _
Public Class Ranks
Visual C++
[SerializableAttribute]
public ref class Ranks

Remarks

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 r_i(1 \le r_i \le n
            , where n is the sample size is (r_i - 
            3/8)/(n + 1/4). The Blom normal score corresponding to the observation with rank r_i is

\Phi ^{ - 1} \left( {\frac{{r_i  - 3/8}}{{n 
            + 1/4}}} \right)

where \Phi(\cdot) 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 r_i is (r_i - 1/3)/(n + 1/3)
            . The Tukey normal score corresponding to the observation with rank r_i is

\Phi ^{ - 1} \left( {\frac{{r_i  - 1/3}}{{n + 
            1/3}}} \right)

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 r_i is r_i/(n + 1). The Van der Waerden normal score corresponding to the observation with rank r_i is

\Phi ^{ - 1} \left( {\frac{{r_i }}{{n + 1}}} 
            \right)

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 E(Z_k), where E(\cdot) is the expectation operator and Z_k 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 E(Y_k), where Y_k 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

\frac{1}{n} + \frac{1}{{n - 1}} +  \ldots + 
            \frac{1}{{n - k + 1}}

Ties are handled in the same way as discussed above for the Blom normal scores.

Inheritance Hierarchy

System..::.Object
Imsl.Stat..::.Ranks

See Also