Hello,
In order for the SAS ETS procedures to work there should be a date variable in the data set. This variable must be equally spaced. If there are missing values we should place the ".". If there are non working days e.g. weekends then we should not include any dates that correspond to weekends. So, for example, if 4th of May is Saturday and the weeends are non working days then date variable should be like this:
May, 3
May, 6
.
May, 10
May, 13
Thanks in advance,
Hello Andreas -
In my opinion it depends on the business problem you have at hand. If there is no record in your time series data due to a public holiday the question becomes: was that to be expected?
For example, if in a retail context stores are closed due to a public holiday I would replace these missing values with 0 - as in "no sales". In an energy demand forecasting context a missing value on a public holiday seems to indicate that there was a problem capturing the true demand, so 0 might not be appropriate and maybe replacing the missing value with a mean, median, etc., is the better strategy. In general it might be worthwhile to flag these replacements with a dummy variable (or an event), as it might become useful for modeling purposes later on - for example if the same holiday occurs again in the future you might want to tell your model about it so it can react appropriately.
As you may know, SAS High-Performance Forecasting features a procedure called HPFEVENTS which makes it very convenient to deal with these kinds of events. This procedure can also be accessed via SAS Forecast Studio.
In additon, as you have pointed out already, if missing values are reoccurring regularly due to no sales on weekends for example, you can tell the SAS procedures about it by using the appropriate date format - such as WEEKDAY for example. In this case there is no need need to fill gaps in your time series at all.
Hope that helps,
Udo
Hello Andreas -
In my opinion it depends on the business problem you have at hand. If there is no record in your time series data due to a public holiday the question becomes: was that to be expected?
For example, if in a retail context stores are closed due to a public holiday I would replace these missing values with 0 - as in "no sales". In an energy demand forecasting context a missing value on a public holiday seems to indicate that there was a problem capturing the true demand, so 0 might not be appropriate and maybe replacing the missing value with a mean, median, etc., is the better strategy. In general it might be worthwhile to flag these replacements with a dummy variable (or an event), as it might become useful for modeling purposes later on - for example if the same holiday occurs again in the future you might want to tell your model about it so it can react appropriately.
As you may know, SAS High-Performance Forecasting features a procedure called HPFEVENTS which makes it very convenient to deal with these kinds of events. This procedure can also be accessed via SAS Forecast Studio.
In additon, as you have pointed out already, if missing values are reoccurring regularly due to no sales on weekends for example, you can tell the SAS procedures about it by using the appropriate date format - such as WEEKDAY for example. In this case there is no need need to fill gaps in your time series at all.
Hope that helps,
Udo
To take it a step further, one can create a custom interval to reflect the holiday pattern. See
http://www.sascommunity.org/wiki/Generating_Holiday_Lists#Custom_Intervals
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.