# ARIMA with difficult seasonality in R

I have non-stationary time series. It has evident trend in means and seasonality. These raw data are measured every second. On the plot of original series I see trend and seasonality about 80,81 (after each 80 second we can see new growth). It is possible that I will never obtain model with white noise? I have tried first difference and first seasonal difference on 80 and second seasonal difference with 81 pediod, and twice of 81. And stiil I have regular data in residuals! It is possible??

I have used R. I have tried different ways: step-by-step, ARIMA with different settings for differences, auto.arima. I do not know why I cannot receive white noise in the residuals. I look on ACF of residuals.

Below I present my data.

3785
4542
4542
4542
4542
4542
4542
4542
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
4731
5772
8043
8516
8516
8516
8516
8516
8516
8516
8516
8516
8516
8516
8516
8516
8516
8516
8705
8705
8705
8705
8705
8705
8705
8705
8705
8705
8800
8800
8800
8800
8800
8800
8800
8800
8800
8800
8800
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
8989
10314
12585
13058
13058
13058
13058
13058
13058
13058
13058
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
13247
14288
16843
17032
17032
17032
17032
17032
17032
17032
17032
17032
17032
17032
17032
17032
17032
17032
17032
17032
17032
17032
17032
17316
17316
17316
17316
17316
17316
17316
17316
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
17505
18073
21101
21290
21290
21290
21290
21290
21290
21290
21290
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21574
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
21763
25359
25548
25548
25548
25548
25548
25548
25548
25548
25548
25548
25548
25548
25548
25548
25548
25548
25548
25548
25548
25548
25548
25832
25832
25832
25832
25832
25832
25832
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
26021
29333
30090
30090
30090
30090
30090
30090
30090
30090
30090
30090
30090
30090
30090
30090
30090
30090
30279
30279
30279

• Your data has the series of repeating values. By construction ARIMA processes cannot have such values, hence it is no suprise that you are not able to get white noise in the residuals. – mpiktas Jan 2 '14 at 14:24
• Looks like a step data when plotted. You might want to use some sort of step function(en.wikipedia.org/wiki/Step_function) to model this type of data. Also you can check out digital signal processing in engineering, where this type of data can be handled easily using tools like MATLAB. – forecaster Jan 2 '14 at 16:04
• @mpiktas yes, data has series of repeating values, but they are not regular. I can decompose the series to trend component, seasonal component and reminders. Do you think that I can model the reminders by ARIMA and look for white noise? It could make sense? By the way, ARIMA predicts future values of this series quite good. – KateRin Jan 2 '14 at 17:29
• @forecaster, I would like to decompose the series into trend, seasonal and white noise and maybe something else (as I have written above). Are you sure that only step function is proper way for this forecasting? – KateRin Jan 2 '14 at 18:08
• @KateRin step function might be one of the approach that you can use, it certainly is not the only way. How is this data collected, I'm assuming some type of sensor, if the data is collected every second, you might want to approch this probelm using signal processing vs. statistical time series analysis. I may be wrong, but there might be better approaches in statistics that I'm not aware of. – forecaster Jan 2 '14 at 19:54

I'm not sure if ARIMA would be able to decompose the data into interprettable/decomposed time series.

I used Proc UCM in SAS which is a state space model. Following is the code of a basic structural model. The data is decomposed into Trend (level+slope) + Seasonal and White noise (Irregular). There is not much white noise left after you model. I'm assuming this is what you were looking for. The model fits the data like a glove. If you have access to SAS, you can try running the following code, you can get the decomposed series.

Level + Slope+ Seasonal + Irregular (not Shown).

You could also try STL decomposition in R.

ods graphics on; proc ucm data = data;

      id date interval = second;
model value;
irregular plot = smooth;
level ;
slope variance = 0 noest;
season length = 80 ;
dep lags = 2;
forecast plot=(forecasts decomp) lead = 80 outfor=forecast;
run ;
ods graphics off ;