Stats.Ranks Method

Definition

Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

Ranks(DateTime[]) Returns the ranks of the observations.
Ranks(Double[]) Returns the ranks of the observations.
Ranks(Vector<Double>) Returns the ranks of the observations.
Ranks(DateTime[], RankTiebreaker, TimeSpan) Returns the ranks of the observations.
Ranks(Double[], RankTiebreaker, Double) Returns the ranks of the observations.
Ranks(Vector<Double>, RankTiebreaker, Double) Returns the ranks of the observations.

Stats.Ranks(DateTime[])

Returns the ranks of the observations.
C#
public static double[] Ranks(
	DateTime[] values
)

Parameters

values  DateTime[]
A Double array.

Return Value

Double[]
A Double array containing the ranks of each observation.

Remarks

The smallest observation has rank 1. If several observations have the same value, then the average of the ranks is used. The rank for missing values is NaN.

Exceptions

ArgumentNullExceptionvalues is null.

Stats.Ranks(Double[])

Returns the ranks of the observations.
C#
public static double[] Ranks(
	double[] values
)

Parameters

values  Double[]
A Double array.

Return Value

Double[]
A Double array containing the ranks of each observation.

Remarks

The smallest observation has rank 1. If several observations have the same value, then the average of the ranks is used. The rank for missing values is NaN.

Exceptions

ArgumentNullExceptionvalues is null.

Stats.Ranks(Vector<Double>)

Returns the ranks of the observations.
C#
public static Vector<double> Ranks(
	this Vector<double> values
)

Parameters

values  Vector<Double>
A Double array.

Return Value

Vector<Double>
A Double array containing the ranks of each observation.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<Double>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

The smallest observation has rank 1. If several observations have the same value, then the average of the ranks is used. The rank for missing values is NaN.

Exceptions

ArgumentNullExceptionvalues is null.

Stats.Ranks(DateTime[], RankTiebreaker, TimeSpan)

Returns the ranks of the observations.
C#
public static double[] Ranks(
	DateTime[] values,
	RankTiebreaker tiebreaker,
	TimeSpan tolerance
)

Parameters

values  DateTime[]
A Double array.
tiebreaker  RankTiebreaker
A RankTiebreaker value that specifies how to assign the ranks of tied observations.
tolerance  TimeSpan
A TimeSpan value that specifies the largest difference between values for which ranks should be considered tied.

Return Value

Double[]
A Double array containing the ranks of each observation.

Remarks

The smallest observation has rank 1. Observations that are within the value tolerance of each other are considered equal. If several values are equal, then the rank is assigned using the method specified by tiebreaker.

Exceptions

ArgumentNullExceptionvalues is null.

Stats.Ranks(Double[], RankTiebreaker, Double)

Returns the ranks of the observations.
C#
public static double[] Ranks(
	double[] values,
	RankTiebreaker tiebreaker,
	double tolerance
)

Parameters

values  Double[]
A Double array.
tiebreaker  RankTiebreaker
A RankTiebreaker value that specifies how to assign the ranks of tied observations.
tolerance  Double
The

Return Value

Double[]
A Double array containing the ranks of each observation.

Remarks

The smallest observation has rank 1. Observations that are within the value tolerance of each other are considered equal. If several values are equal, then the rank is assigned using the method specified by tiebreaker. The rank for missing values is NaN.

Exceptions

ArgumentNullExceptionvalues is null.

Stats.Ranks(Vector<Double>, RankTiebreaker, Double)

Returns the ranks of the observations.
C#
public static Vector<double> Ranks(
	this Vector<double> values,
	RankTiebreaker tiebreaker,
	double tolerance
)

Parameters

values  Vector<Double>
A Double array.
tiebreaker  RankTiebreaker
A RankTiebreaker value that specifies how to assign the ranks of tied observations.
tolerance  Double
The

Return Value

Vector<Double>
A Double array containing the ranks of each observation.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<Double>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

The smallest observation has rank 1. Observations that are within the value tolerance of each other are considered equal. If several values are equal, then the rank is assigned using the method specified by tiebreaker. The rank for missing values is NaN.

Exceptions

ArgumentNullExceptionvalues is null.

See Also