({{, (RefLink[MissingDataMethod, paclet:ref/MissingDataMethod]) 
is an option to (RefLink[TemporalData, paclet:ref/TemporalData]) and other functions that controls how to process missing data. }})

OpenersNotesSection(Spacer1)Details

A missing data method typically provides methods for how to fill in values that are missing.

Typical settings include:

The missing data methods for individual functions are documented on the corresponding reference pages.

OpenersPrimaryExamplesSection(Spacer1)Examples  (6)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Fill in missing data values using linear interpolation:

data={-1,-2,-1,0,Missing[],2,1,2,1,0,1,2,1,2,3};

ListLinePlot[data]

Use (RefLink[TemporalData, paclet:ref/TemporalData]) to create a complete path:

td=TemporalData[data,{1},MissingDataMethod->{"Interpolation",InterpolationOrder->1}];

ListLinePlot[td]

OpenersExampleSection1(Spacer1)Scope  (2)

Fill missing values with a constant:

data={-1,-2,-1,0,Missing[],2,1,2,1,0,Missing[],2,1,2,3};

ts=TimeSeries[data,MissingDataMethod->{"Constant",3}]

{ListLinePlot[data,DataRange->{0,14}],ListLinePlot[ts,Epilog->{Red,PointSize[Medium],Point[{4,3}],Point[{10,3}]}]}

Fill missing values by keeping the value from the left:

data={-1,-2,-1,0,Missing[],2,1,2,1,0,1,Missing[],3,2,3};

ts=TimeSeries[data,MissingDataMethod->{"Interpolation",InterpolationOrder->0}]

{ListLinePlot[data,DataRange->{0,14}],ListLinePlot[ts]}

OpenersExampleSection4(Spacer1)Properties & Relations  (2)

The default method for (RefLink[EventSeries, paclet:ref/EventSeries]) is interpolation of order 0:

data={-1,-2,-1,4,Missing[],2,1,2,1};

es=EventSeries[data,MissingDataMethod->Automatic]

ListPlot[{data,es},DataRange->{0,8},Filling->{1->Axis},PlotLegends->{"data","es"}]

The default method for (RefLink[TimeSeries, paclet:ref/TimeSeries]) is interpolation of order 1:

data={-1,-2,-1,4,Missing[],2,1,2,1};

ts=TimeSeries[data,MissingDataMethod->Automatic]

ListPlot[{data,ts},DataRange->{0,8},Joined->{False,True},Filling->{1->Axis},PlotLegends->{"data","ts"}]

OpenersExampleSection5(Spacer1)Possible Issues  (1)

The choice of (RefLink[MissingDataMethod, paclet:ref/MissingDataMethod]) will produce varying results:

data={-1,-2,-1,0,Missing[],2,1,2,1,0,1,2,1,2,3};

Do not specify missing values:

ts1=TimeSeries[data,MissingDataMethod->None]

Accumulate:

res1=Accumulate[ts1];

Fill missing values with a constant:

ts2=TimeSeries[data,MissingDataMethod->{"Constant",5}];

res2=Accumulate[ts2];

Use interpolation to fill in missing values:

ts3=TimeSeries[data,MissingDataMethod->{"Interpolation",InterpolationOrder->1}];

res3=Accumulate[ts3];

Compare the results:

ListLinePlot/@{res1,res2,res3}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[TimeSeries, paclet:ref/TimeSeries])  ▪  (RefLink[EventSeries, paclet:ref/EventSeries])  ▪  (RefLink[TemporalData, paclet:ref/TemporalData])  ▪  (RefLink[TimeSeriesForecast, paclet:ref/TimeSeriesForecast])  ▪  (RefLink[DeleteMissing, paclet:ref/DeleteMissing])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Time Series Processing, paclet:guide/TimeSeries])}})}})