Please, be kind, as I'm totally noob in stats and R...

I'm the owner of a small restaurant in a commercial center, and I managedd to collect two main dataset, commercial-center (cc) and restaurant (rest).

cc https://www.dropbox.com/s/7k6k1rjimrcfqlq/cc.csv?dl=0
DAY 10:00-12.00 12:00-14:00 14:00-16:00 16:00-18:00 18:00-20:00 20:00-22:00 SUB-TOTAL
01/01/2012 0 825,55 534,85 879,7 964,725 161,975 3366,8

till today

rest https://www.dropbox.com/s/rtoqwg64tu4poxs/rest.csv?dl=0
is a database of all the restaurant sales from 04 dec 2014
I have managed to make it in a similar fashion as the above format
It contains many NA values (periods we were closed)

Also, I gathered other data:
is a dataset containing holidays and other events (it has to be categorized, as some increase sales, some the opposite)

a collection of calculated observation for a spot 2 km away from the restaurant, each observation (wind speed, temp, cloudness and rain) have been turned in a value on a scale of 4 values

My objectives are:

  1. understand 'rest' seasonalities (daily/weekly, yearly)
  2. understand how weather and other independet variables (not fixed events i.e. Easter or concerts) modify 'rest' and find a coefficient to apply to the model
  3. forecast next days, weeks, months sales movements
  4. verificate the restaurant trend, net of seasonalities and other variables

An SD up to 30-40% on model/observed is still a good point to me as long as error distribution is not well spread but with a solid peak on 0

After many testing and try, I have found that the best model to choose is TBATS (BATS is deadly slow to me), expecially for managing multiple seasonality (which is a main point in my study).

The method I was thinking was to:

  1. Find indipendent variables coefficient for 'rest' and 'cc' and apply them to the data
  2. Load 'rest' and 'c'c, with modifications at point 1, in an msts object and throw them to TBATS
  3. Find correlations or other kind of link between the seasonalities of 'rest' and 'cc', get coefficients and use them for modeling future 'rest' data

Not sure whether I can post multiple questions in here, if not just answer to this please: am I choosing the proper work method, or is anything better out there?

I'm struggling myself with many questions:

  1. How can I properly describe the data I have in R for using in TBATS, with sampling every 2 hours, starting at 10 and finishing at 22? Should I create a model for each column?
  2. TBATS is not allowing for independent variables (events), is it? How to manage them?
  3. TBATS does not accept NA values? How to manage the closing periods or days (NA) in the 'rest' dataset? Some weeks we were closed on Mondays, some Tuesday, some others we were always opening; we have some afternoon openings.... big mess... Maybe use regressions..?
  4. If I do:

    export <- data.frame(DAYS=date,tbats.components(cc-SUBTOTAL.msts.tbats),errors=resid(cc-SUBTOTAL.msts.tbats))

how should I interpretate data?
i.e. If I do level+season1+season2+errors=cObserved, I get figures which are slightly different from the "real" observed: sd(cObserved/observed)=3% which is fine for my objectives... is it correct?

  1. In TBATS, is trend some kind of SMA? at which window?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.