ISmBandpassFilter.MissingData

Syntax

MissingData: IMissingData;

Description

The MissingData property determines missing data treatment parameters.

Comments

Method of missing data treatment MissingDataMethod.Casewise cannot be used.

Example

Add a link to the Stat system assembly.

Sub UserProc;
Var
    bpf: SmBandpassFilter;
    can: Array[22Of Double;
    res, i: Integer;
Begin
    bpf := New SmBandpassFilter.Create;
    // Set variable values
    can[00] := 6209; can[01] := 6385;
    can[02] := 6752; can[03] := 6837;
    can[04] := 6495; can[05] := 6907;
    can[06] := 7349; can[07] := Double.Nan;
    can[08] := 7180; can[09] := Double.Nan;
    can[10] := 7132; can[11] := 7137;
    can[12] := 7473; can[13] := 7722;
    can[14] := 8088; can[15] := 8516;
    can[16] := 8941; can[17] := Double.Nan;
    can[18] := 9380; can[19] := 9746;
    can[20] := 9907; can[21] := 10333;
    // Define parameters of sample period
    bpf.ModelPeriod.FirstPoint := 0;
    bpf.ModelPeriod.LastPoint := 21;
    // Determine explained series
    bpf.Serie.Value := can;
    // Determine missing data treatment parameters
    bpf.MissingData.Method := MissingDataMethod.LinInterpolation;
    // Set weight
    bpf.Width := 2;
    // Determine upper and lower cutoff frequency
    bpf.FrequencyHigh := 7;
    bpf.FrequencyLow := 2;
    // Execute method calculation and output results
    res := bpf.Execute;
    If res <> 0 Then
        Debug.WriteLine(bpf.Errors);
        Else
            Debug.WriteLine("=== Model series ===");
            Debug.Indent;
            For i := 0 To bpf.Fitted.Length - 1 Do
                Debug.WriteLine(bpf.Fitted[i]);
            End For;
            Debug.Unindent;
            Debug.WriteLine("=== Residuals ===");
            Debug.Indent;
            For i := 0 To bpf.Residuals.Length - 1 Do
                Debug.WriteLine(bpf.Residuals[i]);
            End For;
            Debug.Unindent;
            Debug.WriteLine("=== Weights ===");
            Debug.Indent;
            For i := 0 To bpf.Weights.Length - 1 Do
                Debug.WriteLine(bpf.Weights[i]);
            End For;
            Debug.Unindent;
            Debug.WriteLine("=== Durbin-Watson statistic ===");
            Debug.WriteLine(bpf.SummaryStatistics.DW);
            Debug.WriteLine("=== Mean error ===");
            Debug.WriteLine(bpf.SummaryStatistics.ME);
    End If;
End Sub UserProc;

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

See also:

ISmBandpassFilter