ISmCurveEstimation.SeasonalAdjustment

Синтаксис

SeasonalAdjustment: Array;

Описание

Свойство SeasonalAdjustment возвращает сезонную составляющую.

Пример

Sub Main;

Var

trend: SmCurveEstimation;

d0: Double;

status, i: Integer;

ar: Array Of Double;

Begin

trend := New SmCurveEstimation.Create;

ar := New Double[25];

ar[00] := 4110;

ar[01] := 4280;

ar[02] := 4459;

ar[03] := 4545;

ar[04] := 4664;

ar[05] := 4861;

ar[06] := 5195;

ar[07] := 5389;

ar[08] := 5463;

ar[09] := 5610;

ar[10] := 5948;

ar[11] := 6218;

ar[12] := 6521;

ar[13] := 6788;

ar[14] := 7222;

ar[15] := 7486;

ar[16] := 7832;

ar[17] := 8153;

ar[18] := 8468;

ar[19] := 9054;

ar[20] := 9499;

ar[21] := 9866;

ar[22] := 10217;

ar[23] := 10763;

ar[24] := 10683;

trend.Explained.Value := ar;

trend.Explanatory.IsTrend := True;

trend.Explanatory.ReferencePoint := 99;

trend.ModelPeriod.LastPoint := 20;

trend.ForecastLastPoint := 30;

trend.SeasonalComponent.Mode := SeasonalityType.additive;

trend.SeasonalComponent.Cycle := 4;

status := trend.Execute;

If status <> 0 Then

Debug.WriteLine(trend.Errors);

Else

For i := 0 To trend.SeasonalAdjustment.Length - 1 Do

d0 := trend.SeasonalAdjustment[i];

Debug.WriteLine(i.ToString + ": " + d0.ToString);

End For;

End If;

End Sub Main;

После выполнения примера в окно консоли будут выведены значения сезонной составляющей:

Module execution started

0: 4125.3062499999996

1: 4312.8687499999996

2: 4427.0812500000002

3: 4528.7437499999996

4: 4679.3062499999996

5: 4893.8687499999996

6: 5163.0812500000002

7: 5372.7437499999996

8: 5478.3062499999996

9: 5642.8687499999996

10: 5916.0812500000002

11: 6201.7437499999996

12: 6536.3062499999996

13: 6820.8687499999996

14: 7190.0812500000002

15: 7469.7437499999996

16: 7847.3062499999996

17: 8185.8687499999996

18: 8436.0812499999993

19: 9037.7437499999996

Module execution finished

См. также:

ISmCurveEstimation