Serie: IEmSerie;
Serie: Prognoz.Platform.Interop.Modeller.IEmSerie;
The Serie property determines a source series.
If the source series is not specified, calculation of the Autocorrelation Analysis is impossible.
To execute the example, add a link to the Modeller system assembly.
Sub AutoCorrelation;
Var
ExprMod: IExpressModeller;
Serie: IEmSerie;
Ar: Array[14] Of Double;
Sett: IEmAutoCorrelationSettings;
Begin
ExprMod := New ExpressModeller.Create;
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 := ExprMod.CreateAutoCorrelationSettings;
// Setting explained series
Sett.Serie := Serie;
// Setting difference order
Sett.DifferenceOrder := 2;
// Setting lag
Sett.LagOrder := 2;
// Performing calculation
ExprMod.EvaluateMethod("C:\AutoCorrelation.html", Sett, True);
End Sub AutoCorrelation;
Example execution result: the Autocorrelation Analysis method is calculated with set parameters, calculation report is saved to the file C:\AutoCorrelation.html.
Imports Prognoz.Platform.Interop.Modeller;
…
Public Shared Sub Main(Params: StartParams);
Var
ExprMod: IExpressModeller;
Serie: IEmSerie;
Ar: Array[14] Of Double;
Sett: IEmAutoCorrelationSettings;
Begin
ExprMod := New ExpressModeller.Create();
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 := ExprMod.CreateAutoCorrelationSettings();
// Setting explained series
Sett.Serie := Serie;
// Setting difference order
Sett.DifferenceOrder := 2;
// Setting lag
Sett.LagOrder := 2;
// Performing calculation
ExprMod.EvaluateMethod("C:\AutoCorrelation.html", Sett, True);
End Sub;
Example execution result: the Autocorrelation Analysis method is calculated with set parameters, calculation report is saved to the file C:\AutoCorrelation.html.
See also: