Series: IEmSeriesList;
Series: Prognoz.Platform.Interop.Modeller.IEmSeriesList;
The Series property returns the estimated series set
If the estimated series are not specified, correct calculations of the paired correlation coefficients is not possible.
To execute the example, add a link to the Modeller system assembly.
Sub PairCorrelation;
Var
ExprMod: IExpressModeller;
Ar: Array[14] Of Double;
W: Array[3] Of Double;
Serie: IEmSerie;
Sett: IEmPairCorrelationSettings;
SList: IEmSeriesList;
Begin
ExprMod := New ExpressModeller.Create;
Sett := ExprMod.CreatePairCorrelationSettings;
// Setting estimated series set
Ar[0] := 56; Ar[1] := 45; Ar[2] := 23; Ar[3] := 45;
Ar[4] := 65; Ar[5] := 23; Ar[6] := 54; Ar[7] := 87;
Ar[8] := 67; Ar[9] := 98; Ar[10] := 89; Ar[13] := 79;
Ar[11] := Double.Nan; Ar[12] := Double.Nan;
Serie := ExprMod.Series.Add(Ar, "X1", "Data series 1");
SList := Sett.Series;
SList.Add(Serie);
Ar[0] := 58; Ar[1] := 50; Ar[2] := 26; Ar[4] := 72;
Ar[5] := 28; Ar[6] := 62; Ar[7] := 95; Ar[8] := 74;
Ar[10] := 94; Ar[11] := 100; Ar[12] := 54; Ar[13] := 81;
Ar[3] := Double.Nan; Ar[9] := Double.Nan;
Serie := ExprMod.Series.Add(Ar, "X2", "Data series 2");
SList.Add(Serie);
Ar[0] := 27; Ar[1] := 61; Ar[2] := 96; Ar[3] := 95;
Ar[4] := 77; Ar[5] := 59; Ar[6] := 51; Ar[7] := 25;
Ar[8] := 71; Ar[9] := 99; Ar[12] := 82; Ar[13] := 51;
Ar[10] := Double.Nan; Ar[11] := Double.Nan;
Serie := ExprMod.Series.Add(Ar, "X3", "Data series 3");
SList.Add(Serie);
// Setting weights series
Ar[0] := 1.3; Ar[1] := 2.7; Ar[2] := 4.5; Ar[3] := 1.3;
Ar[4] := 2.7; Ar[5] := 4.5; Ar[6] := 1.3; Ar[7] := 2.7;
Ar[8] := 4.5; Ar[9] := 1.3; Ar[10] := 2.7; Ar[11] := 4.5;
Ar[12] := 1.3; Ar[13] := 2.7;
Serie := ExprMod.Series.Add(Ar, "X4", "Weights series");
Sett.Weights := Serie;
// Performing calculation
ExprMod.EvaluateMethod("C:\PairCorrelation.html", Sett, True);
End Sub PairCorrelation;
Example execution result: paired correlation coefficients are to be calculated with set parameters, calculation report is to be saved to the file C:\PairCorrelation.html.
Imports Prognoz.Platform.Interop.Modeller;
…
Public Shared Sub PairCorrelation();
Var
ExprMod: IExpressModeller;
Ar: Array[14] Of Double;
W: Array[3] Of Double;
Serie: IEmSerie;
Sett: IEmPairCorrelationSettings;
SList: IEmSeriesList;
Begin
ExprMod := New ExpressModeller.Create();
Sett := ExprMod.CreatePairCorrelationSettings();
// Setting estimated series set
Ar[0] := 56; Ar[1] := 45; Ar[2] := 23; Ar[3] := 45;
Ar[4] := 65; Ar[5] := 23; Ar[6] := 54; Ar[7] := 87;
Ar[8] := 67; Ar[9] := 98; Ar[10] := 89; Ar[13] := 79;
Ar[11] := Double.Nan; Ar[12] := Double.Nan;
Serie := ExprMod.Series.Add(Ar, "X1", "Data series 1");
SList := Sett.Series;
SList.Add(Serie);
Ar[0] := 58; Ar[1] := 50; Ar[2] := 26; Ar[4] := 72;
Ar[5] := 28; Ar[6] := 62; Ar[7] := 95; Ar[8] := 74;
Ar[10] := 94; Ar[11] := 100; Ar[12] := 54; Ar[13] := 81;
Ar[3] := Double.Nan; Ar[9] := Double.Nan;
SList.Add(Serie);
Serie := ExprMod.Series.Add(Ar, "X2", "Data series 2");
Ar[0] := 27; Ar[1] := 61; Ar[2] := 96; Ar[3] := 95;
Ar[4] := 77; Ar[5] := 59; Ar[6] := 51; Ar[7] := 25;
Ar[8] := 71; Ar[9] := 99; Ar[12] := 82; Ar[13] := 51;
Ar[10] := Double.Nan; Ar[11] := Double.Nan;
Serie := ExprMod.Series.Add(Ar, "X3", "Data series 3");
SList.Add(Serie);
// Setting weights series
Ar[0] := 1.3; Ar[1] := 2.7; Ar[2] := 4.5; Ar[3] := 1.3;
Ar[4] := 2.7; Ar[5] := 4.5; Ar[6] := 1.3; Ar[7] := 2.7;
Ar[8] := 4.5; Ar[9] := 1.3; Ar[10] := 2.7; Ar[11] := 4.5;
Ar[12] := 1.3; Ar[13] := 2.7;
Serie := ExprMod.Series.Add(Ar, "X4", "Weights series");
Sett.Weights := Serie;
// Performing calculation
ExprMod.EvaluateMethod("C:\PairCorrelation.html", Sett, True);
End Sub PairCorrelation;
Example execution result: paired correlation coefficients are to be calculated with set parameters, calculation report is to be saved to the file C:\PairCorrelation.html.
See also: