have you tried a "simple" tbats approach with multiple seasonalities yet as explained here: link
I would suggest you are getting familiar with the forecast
package of Rob J Hyndman. There is also a really good book from him that is available online for free link
As for your Arima approach i would suggest you use the auto.arima()
function in the forecast package. There you can include dummy variables including Fourier terms (as explained in the first link). Here is another example for that method link
IrishStat is for sure not wrong when he says that it is hard to make such forecasts "simply" with R - but (based on my own i experience) it is possible to get some good/decent results.
Update:
#load your data into R
require('data.table')
dat <- fread('data.csv') #only the date and the amount column
setnames(dat, c(1,2), c('date', 'amount'))
dat$date <- as.Date(dat$date, '%d/%m/%y') #transform date column into real dates
dat[,Weekday := weekdays(date)] # create a column for the weekdays
#create a time series
dat.ts <- ts(dat$amount, frequency=7)
require('forecast')
#fit a tbats model, forecast 30days, and plot it
fm.tbats <- tbats(dat.ts)
fc.tbats <- forecast(fm.tbats, h=30)
plot(fc.tbats)
#fit an arima model with a fourier term, forecast 30days and plot it
fm.arima <- auto.arima(dat.ts, xreg=fourier(dat.ts, 3))
fc.arima <- forecast(fm.arima, xreg=fourierf(dat.ts,3,30), h=30)
plot(fc.arima)
#fit an arima model with dummies for day of the week
dummies <- cbind(model.matrix(~dat$Weekday)[,2:7])
colnames(dummies) <- c('Tue','Wed','Thu','Fri','Sat','Sun')
fm.arima.d <- auto.arima(dat$amount, xreg=dummies)
That is how you can use auto.arima()
and tbats()
to work with your data. I am not saying anything about if it is good/fits your data/whatever - i just wanted to show you how to use it in the right way. When your dataset is less then a year you can also test other functions in the forecast
package like stl()
for example. When you type ?stl()
you will see the help file for the function which normally includes a simple example on how it works. I highly recommend you to have a look at the book from Rob J Hyndman.