BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Jade_SAS
Pyrite | Level 9

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:

   

DateLocationdepartmentVisitsHolidays
1/1/2010Achild301
1/1/2010AAdult501
1/1/2010Bchild201
1/1/2010BAdult301
1/2/2010Achild2000
1/2/2010AAdult3000
1/2/2010Bchild2000
1/2/2010BAdult3500
1/3/2010Achild1000
1/3/2010AAdult3000
1/3/2010Bchild1000
1/3/2010BAdult3500
Values going onValues going onValues going onValues going onValues going on
11/20/2017Achild1000
11/20/2017AAdult2000
11/20/2017Bchild1000
11/20/2017BAdult2500
11/21/2017Achild.0
11/21/2017AAdult.0
11/21/2017Bchild.0
11/21/2017BAdult.0
11/22/2017Achild.0
11/22/2017AAdult.0
11/22/2017Bchild.0
11/22/2017BAdult.0
11/23/2017Achild.1
11/23/2017AAdult.1
11/23/2017Bchild.1
11/23/2017BAdult.1
11/24/2017Achild.0
11/24/2017AAdult.0
11/24/2017Bchild.0
11/24/2017BAdult.0
11/25/2017Achild.0
11/25/2017AAdult.0
11/25/2017Bchild.0
11/25/2017BAdult.0
11/26/2017Achild.0
11/26/2017AAdult.0
11/26/2017Bchild.0
11/26/2017BAdult.0
11/27/2017Achild.0
11/27/2017AAdult.0
11/27/2017Bchild.0
11/27/2017BAdult.0

  

Thanks,

Jade

1 ACCEPTED SOLUTION

Accepted Solutions
Puwang
Obsidian | Level 7

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 

View solution in original post

4 REPLIES 4
Puwang
Obsidian | Level 7

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 

Jade_SAS
Pyrite | Level 9

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

 

Puwang
Obsidian | Level 7

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.

 

event_repository.png

Jade_SAS
Pyrite | Level 9

Thank you so much, Pu!

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Multiple Linear Regression in SAS

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.

Discussion stats
  • 4 replies
  • 1385 views
  • 2 likes
  • 2 in conversation