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

I am using SAS TSFS (Time Series Forecasting) module.

I have an hourly time series which has multiple seasonalities.  i.e. there is an hourly, daily, weekly and monthly seasonlaities in the series.

 

Can you let me know how to handle all the seasonalities in a single model.

1 ACCEPTED SOLUTION

Accepted Solutions
udo_sas
SAS Employee

Hello -

You may want to check out: https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/forecasting-Procedure-for-multiple-s...

Unfortunately PROC UCM (or SSM) is not available in TSFS, so you will have to switch to code.

You may find this paper of interest too: https://forecasters.org/submissions08/MorzuchBernardISF2008.pdf

Thanks,

Udo

View solution in original post

3 REPLIES 3
udo_sas
SAS Employee

Hello -

You may want to check out: https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/forecasting-Procedure-for-multiple-s...

Unfortunately PROC UCM (or SSM) is not available in TSFS, so you will have to switch to code.

You may find this paper of interest too: https://forecasters.org/submissions08/MorzuchBernardISF2008.pdf

Thanks,

Udo

alexchien
Pyrite | Level 9

Another way to approach modeling time series with multiple seasonalities is to use the highest frequency seasonality (hour in your example) as the base seasonality and model the rest of the seasonalities using dummy variables or Trig variables (sin + cosin waves). You cas utilize ARIMAX to fit such models. You might want to consider using the automatic variable selection feature in TSFS to help selecting significant seasonalities. 

alex

BrianLoe
Fluorite | Level 6

I have data that was collected at a daily interval. The data has a 7-day weekly periodicity and then annual seasonality which is really a 365.25 day period.  To handle complex, multiple seasonality you can follow the method described by De Livera, Hyndman, and Snyder in this paper: http://robjhyndman.com/papers/ComplexSeasonality.pdf. The seasonal components are reduced to their Fourier components, and I would describe the update procedure as looking like a "rolling Fourier transform." 

 

Using the Fourier representation of annual seasonality is an effective way to reduce the number of parameters that you have to maintain. So instead of keeping 365 values for a 365 day cycle, you reduce it to say 10 Fourier frequencies which require 20 parameters (2 times the number of frequencies).

 

When I divide all of the values in my time series by the long term mean value (there is no trend, but one could de-trend the data if there was), the data varies from 0.5 to 1.5.  After removing the day-of-week component, the data varies over a much smaller range 0.85 to 1.15. After removing the second level of seasonality (annual), the level varies between 0.96 and 1.04.  That says that about 70% of the variability of the data was determined by day-of-week seasonality, another 22% of the variability was due to day-of-year seasonality. Leaving only 8% noise!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 3 replies
  • 2464 views
  • 0 likes
  • 4 in conversation