Stat Assembly > Stat Assembly Interfaces > IMissingData > IMissingData.SpecifiedVector
SpecifiedVector: Array;
The SpecifiedVector property defines additional parameters for the missing data treatment methods Pattern (MissingDataMethod.Pattern) and Overlay (MissingDataMethod.Overlay).
For these methods the SpecifiedVector property determines the series, based on which the missing data of modeled series are to be substituted.
For other methods of missing data treatment this property is not relevant.
To execute the example, add a link to the Stat system assembly.
Sub UserProc;
Var
FillGaps:SmFillGapsProcedure;
Series:ISlSeries;
serie,OverlaySerie:Array[10] Of Double;
MD: IMissingData;
//Data output procedure
Sub Print(Data: Array Of Double);
Var i: Integer;
Begin
Debug.Indent;
For i := 0 To Data.Length - 1 Do
If Double.IsNan(Data[i]) Then
Debug.WriteLine("----empty---");
Else
Debug.WriteLine(i.ToString + "" + Data[i].ToString);
End If;
End For;
Debug.Unindent;
End Sub Print;
Begin
FillGaps := New SmFillGapsProcedure.Create;
//Output series
serie[0] := 0;
serie[1] := 0;
serie[2] := 0.878471616;
serie[3] := 0.85401205;
serie[4] := Double.Nan;
serie[5] := 1.28083579;
serie[6] := Double.Nan;
serie[7] := 4.237308214;serie[8]:=4.864879297;
serie[9] := 7.765499027;
Series := FillGaps.InputSeries;
Series.Add.Value := serie;
//The series, from which values for missing data substitution will be taken
OverlaySerie[0] := 0;
OverlaySerie[1] := 1;
OverlaySerie[2] := 2;
OverlaySerie[3] := 3;
OverlaySerie[4] := 4;
OverlaySerie[5] := 5;
OverlaySerie[6] := 6;
OverlaySerie[7] := 7;
OverlaySerie[8] := 8;
OverlaySerie[9] := 9;
Series := FillGaps.InputSeries;
Series.Add.Value := serie;
MD := FillGaps.MissingData;
//Missing data treatment method
MD.Method := MissingDataMethod.Overlay;
//Additional parameter for the Overlay missing data treatment methods
MD.SpecifiedVector := OverlaySerie;
Debug.WriteLine("Source series");
Print(Series.Item(0).Value);
FillGaps.Execute;
Debug.WriteLine("Output series");
Print(Series.Item(0).Value);
End Sub UserProc;
After executing the example the console window displays source series and the series calculated using the method of missing data treatment Values of specified series.
See also: