IMissingData.SpecifiedValue

Syntax

SpecifiedValue: Double;

Description

The SpecifiedValue property determines an additional parameter for the missing data treatment method named Specified value (MissingDataMethod.SpecifiedValue).

Comments

For this method the SpecifiedValue property determines the value, with which missing data of the modeled series is to be substituted.

For other methods of missing data treatment this property is not relevant.

Example

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

Sub UserProc;
Var
    LR: ISmLinearRegress;
    serie: Array[10Of Double;
    MD: IMissingData;
    i, res: Integer;
Begin
    LR := New SmLinearRegress.Create;
    serie[0] := 0;
    serie[1] := 0;
    serie[2] := 0.878471616;
    serie[3] := 0.85401205;
    serie[4] := 3.785177462;
    serie[5] := Double.Nan;
    serie[6] := 5.345764494;
    serie[7] := Double.Nan;
    serie[8] := 4.864879297;
    serie[9] := 7.765499027;
    LR.Explained.Value := serie;
    MD := LR.MissingData;
    // Advanced parameter for the method of missing data treatment "Specified value"
    MD.Method := MissingDataMethod.SpecifiedValue;
    MD.SpecifiedValue := 2.22;
    res := LR.Execute;
    Debug.WriteLine("Output series");
    Debug.Indent;
    For i := 0 To LR.Explained.Value.Length - 1 Do
        Debug.WriteLine(LR.Explained.Value[i]);
    End For;
    Debug.Unindent;
    Debug.WriteLine("Source series");
    Debug.Indent;
    For i := 0 To LR.Explained.OriginalValue.Length - 1 do
        Debug.WriteLine(LR.Explained.OriginalValue[i]);
    End For;
    Debug.Unindent;
End Sub UserProc;

After executing the example the console window displays source series and the series calculated using the method of missing data treatment Specified Value:

See also:

IMissingData