Can R be used to understand the impact/effect by public holidays on daily sales ?

Hello Data Science experts,

Could you please share your insights ?

How can we analyse the impact of holidays on sales ?
For e.g. , May 1st is holiday every year.

Does this mean, customer behavior will be pre/postponed to order sales ?
Does it mean, it will decrease the sales due to holiday ?

We did research online and found similar and most relevant is attached.
holiday effect on hotel.pdf (208.0 KB)

We have past 10 years of data on daily basis which include holiday as well.
We do not have the data without holiday.
In order to make correlation between with/without holiday.

We could just make correlation between holiday dates with sales on daily basis as a starting point and thereafter is where we seek your advice.

Thanks in advance

Sorry, but I am stuck even at this level. I'm not a data scientist (yet), so don't really have much (any to be fair) experience.

Obviously, you have more data for days which are not holidays, and these are unpaired data. Can you please let me know what method/approach have you used to find the correlation between two sets of unpaired data of varying lengths?

If you are interested in whether a day being holiday or not affect the sales, that'll be a two sample location problem, and there's plenty of options you can try. But I guess you want more than that.


1 Like

Do you want to interpret the model and make some inferences? Or you just want to forecast and have some measure of the impact of the variable in the model?

If your goal is the latter, then you can build a model using some machine learning technique like a GBM, Deep Learning and check variable importance and local explanations (lime) to see the impact of holidays (and maybe lagged versions to see the impact on previous or posterior days).

For experience I can say that the impact of holidays on retail grocery sells is big, even bigger than any seasonality present in the time series, almost consistently doubles sales compared to regular days (with the reserve that consumption patterns are different between countries).


The description of your issue seems to fit the purpose of the prophet package ( It's meant to do forecasting of daily data with respect to daily events and includes holiday effects.

1 Like

This is exactly we need. Could you please share some resources ?

With regards to my description "We could just make correlation between holiday dates with sales on daily basis as a starting point.."
Since the sales data exhibits seasonality and holidays are sprinkled over the year.
Can we really split the data into unpaired/paired or dates with/without holidays ?

My idea was to make boolean column where
1's represent an holiday and 0's for usual days.
Then correlate this with sales column and check if this relation makes sense

Yes, to understand if holiday makes an impact ? to what degree ?
Also, weigh this impact based on the nature of holiday (for e.g. Christmas holidays might impact differently than May 1st holiday)
Thereafter, quantify the impacts ?

If possible, would like to understand
Holiday appearing just before weekends (for e.g. Friday or Monday) has more impact ?

Thanks for your suggestion. As mentioned, we would like to understand the impact and not to forecast
Does prophet would help us to understand the effects ?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.