1
votes

I have a dataset with 2 years of daily data. The type of data has two seasonal components (weekly and monthly i.e each type of day behaves in similar way and the same for each month). Lets forget holidays fall in different dates each year. I need to build a time series model to forecast 1 or two months of daily data. I've tried ARIMA with different parameters and the predictor always flattens out.

Here my code:

df <read.csv("data.csv", header = TRUE, sep = ";")
tseries <-ts(df[,2],start=1,frequency=7) -- also tried msts but not working        
ARIMAfit <- auto.arima(log10(tseries), approximation=FALSE,trace=FALSE)
Series: log10(tseries) 
ARIMA(2,0,1)(2,0,0)[7] with non-zero mean 

Coefficients:
      ar1     ar2     ma1    sar1    sar2  intercept
  -0.1203  0.2423  0.6590  0.3182  0.4490     2.0577
    s.e.   0.1495  0.0900  0.1404  0.0330  0.0335     0.0508

 sigma^2 estimated as 0.03187:  log likelihood=222.5
AIC=-430.99   AICc=-430.84   BIC=-398.82

Training set error measures:
                  ME      RMSE       MAE        MPE     MAPE      MASE
Training set 0.000745645 0.1777786 0.1273053 -0.7742803 6.340793 0.8641706
                ACF1
Training set -0.00434844

pred <- predict(ARIMAfit, n.ahead = 500)

lines(10^(pred$pred),col="yellow")

enter image description here

I'm not an expert on this kind of modelling so probably I'm making a basic mistake. Any help on this will be much appreciated.

BR

Tomás

1
Sounds like the data can be modeled by regression with a set of basis functions, e.g. fourier analysis.Sun Bee

1 Answers

0
votes

1)See this discussion. on using dummy variables to estimate the monthly and day of the week impacts along with searching for outliers, changes in level, time trends, and changes in day of the week effects (ie seasonal pulses) 2)Why are you logging your data? See this discussion.
3)Post your data with the date and the country where your data is from.