I have some data which is recordings of noise levels within a cellular network, noise value vs. time. In the middle of the night the levels return to normal operating levels which are typically -105dBm while during the day these values fluctuate depending upon the number of users and how much data they are pushing/pulling over the air, values can reach -90dBm during busy hour (4-7pm).

In my recordings I have some samples that are missing, they were either never recorded or there was some intervention on the site and there was no data recorded while the site was off air.

If I wish to impute this missing data what considerations do i need to factor in? There is a time series imputation package in R with a variety of methods but I am unsure as to which method is most appropriate. Any pointers would be greatly appreciated.


Based on the goals of your research you can use the imputeTS package https://cran.r-project.org/web/packages/imputeTS/imputeTS.pdf.

For example, with the function: na.interpolation(time_series, option = "stine"), you will obtain the time series with Stineman interpolation where there are missing values.

If you want something more immediate you can use the function: na.mean(x, option = "median"), so that the missing value are replaced with the median one.

I all depends on how many missing value are present in the time series and what you want to describe with your statistical model.

  • $\begingroup$ thanks for the response, I was referring to imputeTS in my original post I just forgot to mention it. Having researched the topic a bit further I guess I need to do some analysis on the missingness before I can complete the imputation. I have been reading [Comparison of different Methods for Univariate Time Series Imputation in R ](arxiv.org/ftp/arxiv/papers/1510/1510.03924.pdf) and I've read about testing for MCAR and MAR and MNAR. In order to test for this I plan to use the MissMech package but I struggling to get it going. $\endgroup$ – TheGoat Feb 6 '17 at 22:54
  • $\begingroup$ Any ideas how I can pass just the columns of my dataframe with NA values? I have tried ' ColsNA <- colnames(wideRawDF)[colSums(is.na(wideRawDF))>0] ' but I don't know how to pass this character string to TestMCARNormality. $\endgroup$ – TheGoat Feb 6 '17 at 22:58

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.