IDependenceForm.Fitted

Syntax

Fitted: Array;

Description

The Fitted property returns array of values of dependence form modeling series without seasonality.

Example

Sub Main;

Var

trend: SmCurveEstimation;

d0: Double;

status, i: Integer;

ar: Array Of Double;

Forms: IDependenceForms;

Dep: IDependenceForm;

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.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

Forms := trend.DependenceForms;

Dep := Forms.Item(1);

d0 := Dep.CriterionValue;

Debug.WriteLine("Dependence form " + Dep.DisplayName);

Debug.WriteLine("Criterion value "+ ": " + d0.ToString);

Debug.WriteLine("=== Modeling series ===");

For i := trend.ModelPeriod.FirstPoint To Dep.Fitted.Length - 1 Do

d0 := Dep.Fitted[i];

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

End For;

End If;

End Sub Main;

After executing the example the console window displays the following results:

Module execution started

Dependence form: Quadratic

Criterion value: 0.99853888260620427

=== Modeling series ===

1: 4285.7038149350637

2: 4410.5491242310309

3: 4551.1967233424457

4: 4707.6466122693091

5: 4879.8987910116193

6: 5067.9532595693763

7: 5271.8100179425828

8: 5491.4690661312361

9: 5726.9304041353371

10: 5978.1940319548867

11: 6245.259949589883

12: 6528.128157040328

13: 6826.7986543062189

14: 7141.2714413875583

15: 7471.5465182843463

16: 7817.6238849965812

17: 8179.5035415242637

18: 8557.1854878673948

19: 8950.6697240259728

20: 1.#QNAN

21: 1.#QNAN

22: 1.#QNAN

23: 1.#QNAN

24: 1.#QNAN

Module execution finished

See also:

IDependenceForm