Returns a NumericalVariable that represents an index comparing positive to negative values in the specified period..

Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (Extreme.Numerics)

Syntax

Visual Basic (Declaration)
Public Function GetPositiveToNegativeIndex ( _
	length As Integer, _
	referenceVariable As NumericalVariable _
) As NumericalVariable
C#
public NumericalVariable GetPositiveToNegativeIndex (
	int length,
	NumericalVariable referenceVariable
)
C++
public:
NumericalVariable^ GetPositiveToNegativeIndex (
	int length, 
	NumericalVariable^ referenceVariable
)

Parameters

length (System.Int32)
The number of observations in the range.
referenceVariable (Extreme.Statistics.NumericalVariable)
A NumericalVariable whose value determines whether the current observation is added to the positive or the negative side of the ratio.

Return Value

A NumericalVariable.

Remarks

This method calculates an index that compares the sum of observations within the specified period where the corresponding observation of referenceVariable is positive, to the sum of observations where referenceVariable is negative.

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionlength is less than or equal to zero.
ArgumentNullExceptionreferenceVariable is nullNothingnullptr.
DimensionMismatchException The length of referenceVariable does not match the length of the variable.