Series: IEmSeriesList;
Series: Prognoz.Platform.Interop.Modeller.IEmSeriesList;
The Series property returns the number of series (factors) that are used in the calculation.
For the correct calculation of the Variance Analysis method the set must contain not less than two series.
To execute the example, add links to the Modeller, Stat system assemblies.
Sub VarianceAnalysis;
Var
ExprMod: IExpressModeller;
Ar: Array[14] Of Double;
Serie: IEmSerie;
SList: IEmSeriesList;
Sett: IEmVarianceAnalysisSettings;
Begin
ExprMod := New ExpressModeller.Create;
Sett := ExprMod.CreateVarianceAnalysisSettings;
// Setting factors used in calculation
Ar[0] := 5.8; Ar[1] := 5.0; Ar[2] := 2.6; Ar[4] := 7.2;
Ar[5] := 2.8; Ar[6] := 6.2; Ar[7] := 9.5; Ar[8] := 7.4;
Ar[10] := 9.4; Ar[11] := 10; Ar[12] := 5.4; Ar[13] := 8.1;
Ar[3] := Double.Nan; Ar[9] := Double.Nan;
Serie := ExprMod.Series.Add(Ar, "X1", "Data series 1");
SList := Sett.Series;
SList.Add(Serie);
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, "X2", "Data series 2");
SList.Add(Serie);
// Setting analysis type
Sett.AnalysisType := VarianceAnalysisType.TwoFactor;
// Setting significance level
Sett.ConfidenceLevel := 0.1;
// Performing calculation
ExprMod.EvaluateMethod("C:\VarianceAnalysis.html", Sett, True);
End Sub VarianceAnalysis;
Example execution result: the Variance Analysis method is calculated with set parameters, calculation report is saved to the file C:\VarianceAnalysis.html.
Imports Prognoz.Platform.Interop.Modeller;
Imports Prognoz.Platform.Interop.Stat;
…
Public Shared Sub VarianceAnalysis();
Var
ExprMod: IExpressModeller;
Ar: Array[14] Of Double;
Serie: IEmSerie;
SList: IEmSeriesList;
Sett: IEmVarianceAnalysisSettings;
Begin
ExprMod := New ExpressModeller.Create();
Sett := ExprMod.CreateVarianceAnalysisSettings();
// Setting factors used in calculation
Ar[0] := 5.8; Ar[1] := 5.0; Ar[2] := 2.6; Ar[4] := 7.2;
Ar[5] := 2.8; Ar[6] := 6.2; Ar[7] := 9.5; Ar[8] := 7.4;
Ar[10] := 9.4; Ar[11] := 10; Ar[12] := 5.4; Ar[13] := 8.1;
Ar[3] := Double.Nan; Ar[9] := Double.Nan;
Serie := ExprMod.Series.Add(Ar, "X1", "Data series 1");
SList := Sett.Series;
SList.Add(Serie);
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, "X2", "Data series 2");
SList.Add(Serie);
// Setting analysis type
Sett.AnalysisType := VarianceAnalysisType.vaTwoFactor;
// Setting significance level
Sett.ConfidenceLevel := 0.1;
// Performing calculation
ExprMod.EvaluateMethod("C:\VarianceAnalysis.html", Sett, True);
End Sub VarianceAnalysis;
Example execution result: the Variance Analysis method is calculated with set parameters, calculation report is saved to the file C:\VarianceAnalysis.html.
See also: