Hi All,
I'm forecasting next week visit (11/21/2017-11/27/2017) based on the visit history data I have, and I am considering holidays (1 is holiday and 0 is not) in the forecasting.
I have several question of the data structure:
1) Should I input the next week data in the input data for forecasting? See the blue data part
2) Next week visit (11/21/2017-11/27/2017) is input missing here, anything wrong about this?
3) If on some dates, there is no visits at all. For example if no visits on 3/3/2013. Should I input this history data with visit as 0?
The data structure I have is below:
Date | Location | department | Visits | Holidays |
1/1/2010 | A | child | 30 | 1 |
1/1/2010 | A | Adult | 50 | 1 |
1/1/2010 | B | child | 20 | 1 |
1/1/2010 | B | Adult | 30 | 1 |
1/2/2010 | A | child | 200 | 0 |
1/2/2010 | A | Adult | 300 | 0 |
1/2/2010 | B | child | 200 | 0 |
1/2/2010 | B | Adult | 350 | 0 |
1/3/2010 | A | child | 100 | 0 |
1/3/2010 | A | Adult | 300 | 0 |
1/3/2010 | B | child | 100 | 0 |
1/3/2010 | B | Adult | 350 | 0 |
Values going on | Values going on | Values going on | Values going on | Values going on |
11/20/2017 | A | child | 100 | 0 |
11/20/2017 | A | Adult | 200 | 0 |
11/20/2017 | B | child | 100 | 0 |
11/20/2017 | B | Adult | 250 | 0 |
11/21/2017 | A | child | . | 0 |
11/21/2017 | A | Adult | . | 0 |
11/21/2017 | B | child | . | 0 |
11/21/2017 | B | Adult | . | 0 |
11/22/2017 | A | child | . | 0 |
11/22/2017 | A | Adult | . | 0 |
11/22/2017 | B | child | . | 0 |
11/22/2017 | B | Adult | . | 0 |
11/23/2017 | A | child | . | 1 |
11/23/2017 | A | Adult | . | 1 |
11/23/2017 | B | child | . | 1 |
11/23/2017 | B | Adult | . | 1 |
11/24/2017 | A | child | . | 0 |
11/24/2017 | A | Adult | . | 0 |
11/24/2017 | B | child | . | 0 |
11/24/2017 | B | Adult | . | 0 |
11/25/2017 | A | child | . | 0 |
11/25/2017 | A | Adult | . | 0 |
11/25/2017 | B | child | . | 0 |
11/25/2017 | B | Adult | . | 0 |
11/26/2017 | A | child | . | 0 |
11/26/2017 | A | Adult | . | 0 |
11/26/2017 | B | child | . | 0 |
11/26/2017 | B | Adult | . | 0 |
11/27/2017 | A | child | . | 0 |
11/27/2017 | A | Adult | . | 0 |
11/27/2017 | B | child | . | 0 |
11/27/2017 | B | Adult | . | 0 |
Thanks,
Jade
Hi Jade,
Here are the answers to your questions:
1) Yes. The holiday indicator in the future is deterministic. Thus you will have to feed the future value of the holiday indicator values to forecast studio. Otherwise, forecast studio will attempt to forecast the holiday indicator values assuming it is a stochastic input variable, and of course the forecasts will be off.
2) No problem. Forecast Studio will forecast those periods for you.
3) It depends.
If 0 visit is caused by some factors such as closing, weather, ... etc, it should be marked as missing rather than 0.
If it is a repeated seasonal pattern, it can remain as 0.
You can also add 1 to all historical #visits so that multiplicative smoothing models can be considered. Just remember to subtract 1 from the forecasts to get the final forecasts.
Hope this helps.
Pu
Hi Jade,
Here are the answers to your questions:
1) Yes. The holiday indicator in the future is deterministic. Thus you will have to feed the future value of the holiday indicator values to forecast studio. Otherwise, forecast studio will attempt to forecast the holiday indicator values assuming it is a stochastic input variable, and of course the forecasts will be off.
2) No problem. Forecast Studio will forecast those periods for you.
3) It depends.
If 0 visit is caused by some factors such as closing, weather, ... etc, it should be marked as missing rather than 0.
If it is a repeated seasonal pattern, it can remain as 0.
You can also add 1 to all historical #visits so that multiplicative smoothing models can be considered. Just remember to subtract 1 from the forecasts to get the final forecasts.
Hope this helps.
Pu
Thank you Pu for your quick response!
More questions to clarify:
about question 1) Usually how will you feed the future value of the holiday indicator values to forecast studio? Is my way okay (regard it as a variable in the input data)?
about question 3), I didn't get "add 1 to all historical #visits so that multiplicative smoothing models can be considered". Can you explain more or is there any documents about it?
Thank you!
Jade
Your method of adding holiday as an input variable definitely works. Another way is to use the event repository in Forecast Studio. In Forecast Studio, go to project->Event Repository, you can add holiday definitions. There are a set of predefined holidays for you to select, see attached screen shot.
For question 3, multiplicative smoothing models will not be considered if there're 0's in target variable. By adding 1 to all historical #visits, you can get rid of 0's (if any), so that multiplicative smoothing models can be considered during the forecasting diagnose process.
Thank you so much, Pu!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.