Computes the Pearson correlation of two data sets, excluding pairs where either
value is missing.
Namespace:
CenterSpace.NMath.StatsAssembly: NMathStats (in NMathStats.dll) Version: 3.4.0.0
Syntax
| C# |
|---|
public static double NaNCorrelation( int[] data1, double[] data2 ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function NaNCorrelation ( _ data1 As Integer(), _ data2 As Double() _ ) As Double |
| Visual C++ |
|---|
public: static double NaNCorrelation( array<int>^ data1, array<double>^ data2 ) |
Parameters
- data1
- Type: array<
System..::.Int32
>[]()[]
The first data set.
- data2
- Type: array<
System..::.Double
>[]()[]
The second set set.
Return Value
Correlation.
Exceptions
| Exception | Condition |
|---|---|
| CenterSpace.NMath.Core..::.InvalidArgumentException | Thrown if the given data has zero or one non-NaN pair. |