ISmSlideSmoothing.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
    Slide: SmSlideSmoothing;
    s: Array[10Of Double;
    res, i: Integer;
Begin
    Slide := New SmSlideSmoothing.Create;
    // Set variable values
    s[0] := 670.2; s[1] := 576.06;
    s[2] := 856.9; s[3] := Double.Nan;
    s[4] := 885.4;  s[5] := 1011.8;
    s[6] := 995.44; s[7] := 1064.74;
    s[8] := 780.85; s[9] := Double.Nan;
    // Determine source series parameters
    Slide.Serie.Value := s;
    // Define parameters of sample period
    Slide.ModelPeriod.FirstPoint := 1;
    Slide.ModelPeriod.LastPoint := 10;
    // Determine missing data treatment method
    Slide.MissingData.Method := MissingDataMethod.SampleAverage;
    // Determine the time interval, at which element average will be determined
    Slide.Width := 3;
    // Determine whether moving average will be centered
    Slide.CenterMovingAverage := True;
    // Execute calculation and display results
    res := Slide.Execute;
    If res <> 0 Then
        Debug.WriteLine(Slide.Errors);
        Else
            Debug.WriteLine("Modeling series");
            For i := 0 To Slide.Fitted.Length - 1 Do
                Debug.WriteLine(" " + (i + 1).ToString + ". " + Slide.Fitted[i].ToString);
            End For;
            Debug.WriteLine("Residuals");
            For i := 0 To Slide.Residuals.Length - 1 Do
                Debug.WriteLine(" " + (i + 1).ToString + ". " + Slide.Residuals[i].ToString);
            End For;
            Debug.WriteLine("Durbin-Watson statistic: " + Slide.SummaryStatistics.DW.ToString);
    End If;
End Sub UserProc;

After executing the example the console window displays the modeling series, residuals, and summary statistics.

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
    Slide: SmSlideSmoothing;
    s: Array[10Of Double;
    res, i: Integer;
    Fitted: System.Array;
Begin
    Slide := New SmSlideSmoothing.Create();
    // Set variable values
    s[0] := 670.2; s[1] := 576.06;
    s[2] := 856.9; s[3] := Double.Nan;
    s[4] := 885.4;  s[5] := 1011.8;
    s[6] := 995.44; s[7] := 1064.74;
    s[8] := 780.85; s[9] := Double.Nan;
    // Determine source series parameters
    Slide.Serie.Value := s;
    // Define parameters of sample period
    Slide.ModelPeriod.FirstPoint := 1;
    Slide.ModelPeriod.LastPoint := 10;
    // Determine missing data treatment method
    Slide.MissingData.Method := MissingDataMethod.mdmSampleAverage;
    // Determine the time interval, at which element average will be determined
    Slide.Width := 3;
    // Determine whether moving average will be centered
    Slide.CenterMovingAverage := True;
    // Execute calculation and display results
    res := Slide.Execute();
    If res <> 0 Then
        System.Diagnostics.Debug.WriteLine(Slide.Errors);
        Else
            System.Diagnostics.Debug.WriteLine("Modeling series");
            For i := 0 To Slide.Fitted.Length - 1 Do
                System.Diagnostics.Debug.WriteLine(" " + (i + 1).ToString() + ". " + Slide.Fitted.GetValue(i).ToString());
            End For;
            System.Diagnostics.Debug.WriteLine("Residuals");
            For i := 0 To Slide.Residuals.Length - 1 Do
                System.Diagnostics.Debug.WriteLine(" " + (i + 1).ToString() + ". " + Slide.Residuals.GetValue(i).ToString());
            End For;
            System.Diagnostics.Debug.WriteLine("Durbin-Watson statistic: " + Slide.SummaryStatistics.DW.ToString());
    End If;
End Sub;

See also:

ISmSlideSmoothing