I have a data.table that contains many timing variables.

  • Date: it gives the date of Sales
  • Promo2(week, year): It describes the calendar week and the year when the store has started to participate in the Promo2 (reduction of prices).
  • CompetitionOpenSince(Month, Year): Gives the approximate year and the month of the moment when the nearest competitor was opened.

  • PromoInterval: Describes the consecutive intervals Promo2 is launched, naming the months when the promotion was launched again. For example. "Feb, May, Aug, Nov" means that each round starts in February, May, August, November of a given year for this store.

The Goal is to predict sales for next few week. I have other factor and binary variables such as the type of store(a b,c..), the level of Assortment, CompetitionDistance, number of Customers...

In my work I suggest some variable that uses timing variables above:

  • Compute the number of days between the day of sales and the first
    day when the store started the promo2(Day-Promo2).
  • Compute the number of days between the day of Promo2 and the day when the competitor opened the promo2(Promo2-CompetitionOpenSince).

Note: Dont surprised when I wrote (Day-Promo2) and (Promo2-CompetitionOpenSince) because I transform Promo2 and CompetitionOpenSince to date type using some hypothesis to simplify the work.

What can you suggest more than that? I find it really hard to create new other useful explaining variables mostly the PromoInterval variable!

Thank you for your suggestions!


1 Answer 1


Generally it works well to include some lagged variables.

For example:

  • Sales last week
  • Sales a month ago
  • Inventory a month ago
  • etc
  • 1
    $\begingroup$ But this does not include correlation problems between the explaining variables? Because all of them will be based to the sales variables no? $\endgroup$
    – Amir
    Feb 22, 2018 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.