ISmGeometricExtrapolation.MissingData

Fore Syntax

MissingData: IMissingData;

Fore.NET Syntax

MissingData: Prognoz.Platform.Interop.Stat.IMissingData;

Description

The MissingData property determines missing data treatment parameters.

Comments

By default missing data is not treated.

Fore Example

Add a link to the Stat system assembly.

Sub UserProc;
Var
    GExtra: SmGeometricExtrapolation;
    s: Array[
15Of Double;
    res, i: Integer;
Begin
    GExtra := 
New SmGeometricExtrapolation.Create;
    // values of variables
    s[00] := 6209; s[01] := 6385; s[02] := 6752;
    s[
03] := 6837; s[04] := 6495; s[05] := Double.Nan;
    s[
06] := 7349; s[07] := 7213; s[08] := 7061;
    s[
09] := 7180; s[10] := 7132; s[11] := Double.Nan;
    s[
12] := 7473; s[13] := 7722; s[14] := 8088;
    
// source series parameters
    GExtra.Serie.Value := s;
    
// missing data treatment method
    GExtra.MissingData.Method := MissingDataMethod.LinTrend;
    
// sample period
    GExtra.ModelPeriod.FirstPoint := 1;
    GExtra.ModelPeriod.LastPoint := 
14;
    
// forecast
    GExtra.Forecast.LastPoint := 20;
    
// model calculation and output of results
    res := GExtra.Execute;
    
If res <> 0 Then
        Debug.WriteLine(GExtra.Errors);
        
Else
            Debug.WriteLine(
"Modeling series");
            Debug.Indent;
            
For i := 0 To GExtra.Fitted.Length - 1 Do
                Debug.WriteLine(GExtra.Fitted[i]);
            
End For;
            Debug.Unindent;
    
End If
End Sub UserProc;

After executing the example the console window displays the modeling series.

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
    GExtra: SmGeometricExtrapolation;
    s: Array[15Of Double;
    res, i: Integer;
    Fitted: System.Array;
Begin
    GExtra := New SmGeometricExtrapolation.Create();
    // values of variables
    s[00] := 6209; s[01] := 6385; s[02] := 6752;
    s[03] := 6837; s[04] := 6495; s[05] := Double.Nan;
    s[06] := 7349; s[07] := 7213; s[08] := 7061;
    s[09] := 7180; s[10] := 7132; s[11] := Double.Nan;
    s[12] := 7473; s[13] := 7722; s[14] := 8088;
    // source series parameters
    GExtra.Serie.Value := s;
    // Method of missing data treatment
    GExtra.MissingData.Method := MissingDataMethod.mdmLinTrend;
    // sample period
    GExtra.ModelPeriod.FirstPoint := 1;
    GExtra.ModelPeriod.LastPoint := 14;
    // forecast
    GExtra.Forecast.LastPoint := 20;
    // model calculation and output of results
    res := GExtra.Execute();
    If res <> 0 Then
        System.Diagnostics.Debug.WriteLine(GExtra.Errors);
        Else
            System.Diagnostics.Debug.WriteLine("Modeling series");
            System.Diagnostics.Debug.Indent();
            Fitted := GExtra.Fitted;
            For i := 0 To GExtra.Fitted.Length - 1 Do
                System.Diagnostics.Debug.WriteLine(Fitted[i]);
            End For;
            System.Diagnostics.Debug.Unindent();
    End If;
End Sub;

See also:

ISmGeometricExtrapolation