SAS OPUS Ottawa Ontario November 26 2015 Use of the SAS HighPerformance Forecasting Software to Detect Break in Time Series Outline Context SAS High Performance Forecasting Software Exploration of a ID: 580097
Download Presentation The PPT/PDF document "Frédéric Picard and Steve Matthews" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Frédéric Picard and Steve MatthewsSAS OPUSOttawa, OntarioNovember 26, 2015
Use of the SAS High-Performance Forecasting Software to Detect Break in Time SeriesSlide2
OutlineContextSAS High Performance Forecasting Software
Exploration of a
F
ew OptionsConclusion
2Slide3
ContextMost Time Series at Statistics Canada are Surveys Repeated Over TimeAnnual SurveysSub-Annual Surveys (Monthlies and Quarterlies)
Several Domains
3Slide4
Methodological Changes in Time SeriesTry to minimize changes to surveys, but sometimes necessary:
changing requirements
changing population characteristics (cell phones, e-questionnaire)
maintain or gain efficiency (sampling error)
Artificial change could be misinterpreted as meaningful
prefer to revise past to remove effect
Impact is best estimated by conducting parallel run (costly)
4Slide5
Use of Forecasts for Time Series Break Detection Select a model based on past dataUse that model to “forecast” the current period along with a 95% prediction interval.
Looks if the survey estimate for the current period falls within the interval.
If the survey estimate is outside of the interval then it is an
indication that there is a break.
5Slide6
Salaries and Wages, Industry domain
ARIMA (1,1,0)
Statistical Forecasting : Annual Example
6Slide7
Challenges Related to the Volume Tens of thousands of survey estimatesModel selection and estimationManual model selection is a difficult and time consuming process
Automated model selection can sometimes fail
Inclusion or not of an auxiliary variable to improve forecast.
7Slide8
SAS High Performance Forecasting Features
Several Options
Automated model selection
Fast
Robust
GUI
SAS code (proc
HPFdiagnose
,
HPFengine…)GUI can generate the corresponding SAS code
8Slide9
Several Options Model selection criteria (MAPE, RMSE,…), In-Sample vs Out-of-SampleInclusion or not of an auxiliary variable (force or let HPF decide)
Transform the data or not
Several models available ESM, ARIMAX, UCM, IDM
Outlier detections
9Slide10
RobustIf ARIMAX models fail, HPF will try simpler models such as ESM. It has intermittent demand models for data with a lot of zeroesHPF will (almost) always provide a forecast and a confidence interval if the syntax and file formats are correct.
10Slide11
For our ProjectUsed GUI to explore the different options and their impact on the modelsLooked at the generated SAS codeWe use the SAS code for the production
E
asier to manage datasets
A little bit more flexibleEasy to reuse with other datasets or when data is updated
11Slide12
Proc HPFdiagnose and HPFengineHelpful to determine the best model:
Does the series have a trend?
Is the series seasonal?
Is the auxiliary variable a good predictor of the variable of interest?
Should we transform the data using the log?
12Slide13
Forecasting a Seasonal Monthly SeriesEnergy Consumption, Province*Industry domain
ARIMA (0,1,0)(2,0,0)
13Slide14
Energy Consumption, Province*Industry domain
ESM with trend
Forecasting a non-seasonal Monthly Series
14Slide15
Usefulness of an auxiliary variableSometimes, we have an auxiliary variableIt has the potential of increasing the precisionUsually, in order to be useful
It has to be available for the period that we want to forecast the variable of interest
It has to be a good predictor of the variable of interest.
15Slide16
Total Revenue, Province*Industry domain
ARIMA (0,1,0)
Statistical Forecasting: Annual Example
16Slide17
Total Revenue, Province*Industry domain
ARIMA(1,1,0)
+X(1)
Statistical Forecasting: Annual Example
17Slide18
Roles to Variables
18Slide19
Corresponding Codeproc hpfdiagnose data=… criterion=mape
holdout=
0;transform type=auto ;id
date_SAS
interval=YEAR;
forecast Revenue ;
input
TaxableRevenue
/
REQUIRED=MAYBE(POSITIVE)
;
arimax
identifyorder
=both;
esm
;
run;
19Slide20
Transform Data or Not
20Slide21
Corresponding Codeproc hpfdiagnose
data
=… criterion=
mape
holdout=
0
;
transform type=auto ;
id
date_SAS
interval=YEAR;
forecast Revenue ;
input
TaxableRevenue
/
REQUIRED=MAYBE(POSITIVE)
;
arimax
identifyorder
=both;
esm
;
run;
21Slide22
Selection Criterion
22Slide23
Selection Criterion
23Slide24
Corresponding Codeproc hpfdiagnose
data=…
criterion=
mape
holdout=
0
;
transform type=auto ;
id
date_SAS
interval=YEAR;
forecast Revenue ;
input
TaxableRevenue
/
REQUIRED=MAYBE(POSITIVE)
;
arimax
identifyorder
=both;
esm
;
run;
24Slide25
ConclusionHPF was helpful to us to help manage the large number of forecastHPF allowed us to use complex models (with auxiliary variables)The GUI was helpful to explore different options
HPF is highly automated but we have the option to intervene
25Slide26
26Thank you!
For more information,
Pour plus
d’
information
,
please contact:
veuillez
contacter
:
Frederic Picard
Time Series Research and Analysis Centre
Statistics Canada
f
rederic.picard@canada.ca