IDependenceForm.SummaryStatistics

Fore Syntax

SummaryStatistics: ISummaryStatistics;

Fore.NET Syntax

SummaryStatistics: Prognoz.Platform.Interop.Stat.ISummaryStatistics;

Description

The SummaryStatistics property returns summary statistics of a dependence form.

Comments

In linearized trend models statistics are calculated for a source (non-linear) model.

Fore Example

To execute the example, add a link to the Stat system assembly.

Sub UserProc;
Var
    trend: SmCurveEstimation;
    Stat: Double;
    status: Integer;
    ar: Array[25Of Double;
    Forms: IDependenceForms;
    Dep: IDependenceForm;
Begin
    trend := New SmCurveEstimation.Create;
    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);
            Debug.WriteLine("Dependency form " + Dep.DisplayName);
            Stat := Dep.SummaryStatistics.DW;
            Debug.WriteLine("=== Durbin-Watson statistic ===");
            Debug.WriteLine(Stat);
            Stat := Dep.SummaryStatistics.AIC;
            Debug.WriteLine("=== Akaike information criterion ===");
            Debug.WriteLine(Stat);
    End If
End Sub UserProc;

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

Dependence form: Quadratic

=== Durbin-Watson statistic ===

1,58869528521005

=== Akaike information criterion ===

11,4737970155917

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Stat;

Public Shared Sub Main(Params: StartParams);
Var
    trend: SmCurveEstimation;
    Stat: Double;
    status: Integer;
    ar: Array[25Of Double;
    Forms: IDependenceForms;
    Dep: IDependenceForm;
Begin
    trend := New SmCurveEstimation.Create();
    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.sstAdditive;
    trend.SeasonalComponent.Cycle := 4;
    status := trend.Execute();
    If status <> 0 Then
        System.Diagnostics.Debug.WriteLine(trend.Errors);
        Else
            Forms := trend.DependenceForms;
            Dep := Forms.Item[1];
            System.Diagnostics.Debug.WriteLine("Dependency form " + Dep.DisplayName);
            Stat := Dep.SummaryStatistics.DW;
            System.Diagnostics.Debug.WriteLine("=== Durbin-Watson statistic ===");
            System.Diagnostics.Debug.WriteLine(Stat);
            Stat := Dep.SummaryStatistics.AIC;
            System.Diagnostics.Debug.WriteLine("=== Akaike information criterion ===");
            System.Diagnostics.Debug.WriteLine(Stat);
    End If;
End Sub;

See also:

IDependenceForm