SerieA: IEmSerie;
SerieA: Prognoz.Platform.Interop.Modeller.IEmSerie;
The SerieA property determines the first sample.
If the sample is not specified, correct calculation of the Fisher Test method is not possible.
To execute the example, add a link to the Modeller system assembly.
Sub FisherTest;
Var
ExprMod: IExpressModeller;
Ar: Array[14] Of Double;
Serie: IEmSerie;
Sett: IEmFisherTestSettings;
Begin
ExprMod := New ExpressModeller.Create;
Sett := ExprMod.CreateFisherTestSettings;
// Setting the first sample
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");
Sett.SerieA := Serie;
// Setting the second sample
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");
Sett.SerieB := Serie;
// Setting significance level
Sett.ConfidenceLevel := 0.1;
// Performing calculation
ExprMod.EvaluateMethod("C:\FisherTest.html", Sett, True);
End Sub FisherTest;
Example execution result: the Fisher Test method is calculated with set parameters, calculation report is saved to the file C:\FisherTest.html.
Imports Prognoz.Platform.Interop.Modeller;
…
Public Shared Sub FisherTest();
Var
ExprMod: IExpressModeller;
Ar: Array[14] Of Double;
Serie: IEmSerie;
Sett: IEmFisherTestSettings;
Begin
ExprMod := New ExpressModeller.Create();
Sett := ExprMod.CreateFisherTestSettings();
// Setting the first sample
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");
Sett.SerieA := Serie;
// Setting the second sample
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");
Sett.SerieB := Serie;
// Setting significance level
Sett.ConfidenceLevel := 0.1;
// Performing calculation
ExprMod.EvaluateMethod("C:\FisherTest.html", Sett, True);
End Sub FisherTest;
Example execution result: the Fisher Test method is calculated with set parameters, calculation report is saved to the file C:\FisherTest.html.
See also: