1

I have a ts() object spanning 10 years of annually seasonal precipitation data, containing ~4015 obs with 6 NA's.

> str(TSObject)
 Time-Series [1:4015] from 2007 to 2018: 0.55 1.05 0.46 0.15 0.02 0.07 0.22 0.13 0 0 ...

Plotted below: (TSObject is actually named "US1ORLA0132")

enter image description here

I apply the following ImputeTS command to the ts object:

TSObject_IMP_Struct <- na_kalman(TSObject, model = "StructTS", smooth = TRUE)

When I do this, the process either never finishes running or takes more than 12 hours to do so. This surprises me, as the data set does not seem large enough to warrant that level of computational expense. I have also tried using different na_kalman model inputs to no effect.

What could I be doing wrong that would cause this issue? Or, should I expect the process to take this long?

Steffen Moritz
  • 7,277
  • 11
  • 36
  • 55
Clayton Glasser
  • 153
  • 1
  • 11
  • Inviting @stats0007 – Clayton Glasser Oct 17 '18 at 00:51
  • 2
    No error from your side here. The function is just computationally expensive. Using na.kalman with model ="auto.arima" should be faster. But still everything over 1000 observations might require hours on a normal computer. In the end you have to decide if the results are worth the waiting time. The na.seadec function is a good compromise - it usually has nearly equally good results and is way faster. – Steffen Moritz Nov 09 '18 at 18:34

0 Answers0