SeasonalMovingAverageOrder: Integer;
The SeasonalMovingAverageOrder property determines order of seasonal moving average.
Default property value is 0.
Remember that seasonality period must be defined when you define seasonal moving average IArimaSpecification.Cycle.
Sub Main;
Var
ARIMA: SmArima;
serie: Array Of Double;
Specification: IArimaSpecification;
res, i: Integer;
d0: Double;
Begin
ARIMA := New SmArima.Create;
serie := New Double[26];
serie[0] := 0;
serie[1] := 0;
serie[2] := 0.878471616;
serie[3] := 0.85401205;
serie[4] := 3.785177462;
serie[5] := 1.28083579;
serie[6] := 5.345764494;
serie[7] := 4.237308214;
serie[8] := 4.864879297;
serie[9] := 7.765499027;
serie[10] := 3.548892753;
serie[11] := 5.142962432;
serie[12] := 2.512417383;
serie[13] := 3.382746302;
serie[14] := 4.457015799;
serie[15] := 5.560026451;
serie[16] := 5.402062371;
serie[17] := 6.384467741;
serie[18] := 4.464268156;
serie[19] := 5.803763577;
serie[20] := 3.60729744;
serie[21] := 3.741717667;
serie[22] := 2.958338923;
serie[23] := 2.261327116;
serie[24] := 3.549542062;
serie[25] := 1.829321841;
ARIMA.Serie.Value := serie;
ARIMA.Forecast.LastPoint := 40;
Specification := ARIMA.ArimaSpecification;
Specification.Cycle := 4;
Specification.SeasonalAutoRegressionOrder := 1;
Specification.SeasonalMovingAverageOrder := 1;
Specification.SeasonalDifferenceOrder := 1;
ARIMA.ModelCoefficients.Intercept.Mode := InterceptMode.AutoEstimate;
ARIMA.MaxIteration := 150;
res := ARIMA.Execute;
Debug.WriteLine(res); // display execution status
Debug.WriteLine("=== Modeling series === "); // display data series in the console window
For i := 0 To ARIMA.Fitted.Length - 1 Do
d0 := ARIMA.Fitted[i];
Debug.WriteLine(i.ToString + ", " + d0.ToString);
End For;
End Sub Main;
After executing the example the console window displays the following result:
Module execution started
0
=== Modeling series ===
0, 1.#QNAN
1, 1.#QNAN
2, 1.#QNAN
3, 1.#QNAN
4, 1.#QNAN
5, 1.#QNAN
6, 1.#QNAN
7, 1.#QNAN
8, 6.2224783385658977
9, 4.1444031569045929
10, 3.3614667055950931
11, 3.581049940765118
12, -0.61506083949376
13, 5.0966062089911546
14, 4.2008849515625402
15, 7.5953882129729928
16, 5.0169266702579991
17, 5.7889789625708872
18, 3.1615021001580708
19, 5.5104041574993969
20, 2.3494614095171649
21, 4.6523278922573619
22, 2.1888214633048002
23, 3.7783687982065208
24, 4.0128103799903698
25, 3.0720654546399855
Module execution finished
See also: