So i currently have a dataset in R:

Date            Mean_Value

2003-10-01      7.94
2004-02-01      3.17
2004-03-01      4.62
2004-04-01      5.38
2004-05-01      4.17
2004-06-01      6.40
2004-07-01      4.12
2004-08-01      3.09
2005-01-01      5.32

and I'm planning to plot a time series for the above dataset, but one thing I'm concerned with is that is it the right thing to do, to just plot the time series even though there are some months of the year in the dataset above missing? for example, in the year 2003, the missing months are "November" and "December" while in the year 2004, the months missing are "September,October,November and December".

The year list goes on until 2012, and there are indeed some years with all months present. Although some years are missing certain months like the example above, would i still be able to plot the time series, ignoring the fact that there exist missing months in some years?

  • $\begingroup$ Why couldn't you plot them? Just be sure the date column is translated to an appropriate "X" value rather than the contiguous sequence value. You see TS with big gaps all the time. R-tists sometimes like to drop the point character for intermittent missing values and break the trend-line entirely for large missing gaps. That could be a nice hybrid approach. $\endgroup$ – AdamO Apr 22 at 19:56

you can interpolate in order to estimate the missing values. Time series analysis requires that there are NO MISSING VALUES. https://autobox.com/pdfs/ARIMA%20FLOW%20CHART.pdf

  • 1
    $\begingroup$ I believe the OP is asking about plotting, and not about time series analysis. There is no reason that a time series can't be plotted when there are missing values. The values can simply be left out (or perhaps marked on the plot if it is really important for the viewer to realize that there are missing values). $\endgroup$ – dante Apr 22 at 19:54
  • 1
    $\begingroup$ Interpolation = mean imputation = conservative standard errors. Better to estimate probability model for response and perform a several imputations, combine with Rubin's Rules. $\endgroup$ – AdamO Apr 22 at 19:54
  • $\begingroup$ @dante plotting time series and examining the plot is (to me ) a primitive form of time series analysis. $\endgroup$ – IrishStat Apr 22 at 19:58
  • 1
    $\begingroup$ @IrishStat I can understand that. But it still doesn't seem strictly necessary to impute missing value for a plot. Especially since this sounds like a fairly small data set (120 values, maybe?), imputed points could be misleading. I would think that imputing missing values would only be useful/important if the analyst desires to make inferences from a time series model. The human eye is usually pretty good at understanding missing values, assuming the plot is well-constructed. $\endgroup$ – dante Apr 22 at 20:05
  • $\begingroup$ agreed .. clearly the OP is new to time series and I was just trying to guide him to " the shining city on the hill" a natural consequence of a visual examination/presentation $\endgroup$ – IrishStat Apr 22 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.