I have my data at weekly intervals. I wanted to use a Winters model and since proc esm did not let me choose the smoothing weights I turned to proc forecast. This procedure works fine until I specify seasons=month. Please help solve this or suggest an alternative way to implement Winters method with smoothing weights of my choice. I got the following exception when I used seasons = month in proc forecast
ERROR: An exception has been encountered.
Please contact technical support and provide them with the following traceback information:
The SAS task name is [FORECAST]
Segmentation Violation
Traceback of the Exception:
ERROR: An exception has been encountered.
107 The SAS System 17:44 Saturday, September 22, 2018
Please contact technical support and provide them with the following traceback information:
The SAS task name is [FORECAST]
Segmentation Violation
Thanks!
SEASONS=(MONTH DAY) specifies that 7 day-of-week seasons are nested within 12 month-of-year seasons. The different kinds of intervals can be listed in the SEASONS= option in any order. Note that the Winters method smoothing equations might be less stable when multiple seasonal factors are used. [1]
It might help to use the ADDWINTERS method instead.
METHOD=WINTERS
specifies the Holt-Winters exponentially smoothed trend-seasonal method.
METHOD=ADDWINTERSspecifies the additive seasonal factors variant of the Winters method. [2]
References
Thanks! Do you know what is the default seasonality if I specify method = ADDWINTERS? I could not find it anywhere in the documents.
There is some information in the Forecasting Methods section [1].
For the Winters method, it says,
When the SEASONS= option is not specified, the seasonal factors s (t) are not included in the model.
For Addwinters method, it says,
The ADDWINTERS method is like the WINTERS method except that the seasonal parameters are added to the trend instead of multiplied with the trend.
Therefore, I am assuming that the seasonal factors are not included in the Addwinters model by default, too.
Reference
Hi @roushankumar,
The segmentation violation error you observed in PROC FORECAST when specifying INTERVAL=WEEK and SEASONS=MONTH appears to be due to the fact that weeks do not nest within months (or years). In other words, some weeks in the input data set span two different months. For this very reason, modeling seasonal variation in weekly data can be particularly challenging.
Because PROC FORECAST is considered to be obsolete (see the Overview section of the FORECAST procedure documentation for details), you might want to consider some other approaches for modeling and forecasting your weekly data. PROC UCM might be your best alternative. For example, you could define monthly dummy variables and then include them in either the MODEL statement as simple regressors or in the RANDOMREG statement if you want the coefficients of these regressors to vary over time. A similar alternative is to examine your weekly data and define dummy variables for the weeks in your series that are higher/lower than average from year to year. You can then specify those dummy variables--rather than monthly dummy variables--in your model. This alternative is helpful when you have seasonal variation that does not occur in a specific month from year to year, such as an Easter effect, which might occur in March or April. Another alternative is to use the BLOCKSEASON statement in PROC UCM to define blocks of 4 contiguous weeks (to approximate 1 month) with 13 seasons per year. For example, for weekly data:
BLOCKSEASON BLOCKSIZE=4 NBLOCKS=13; produces a seasonal cycle of 4*13=52 weeks.
I hope this information and these suggestions are helpful! Links to the aforementioned sections of the documentation are noted below.
DW
PROC FORECAST - Overview
PROC UCM - RANDOMREG statement
PROC UCM - BLOCKSEASON statement
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!
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.