Running SAS Forecast Studio - Computer and Information

Download Report

Transcript Running SAS Forecast Studio - Computer and Information

Chapter 7: Forecasting
7.1 Introduction
7.2 Time Series Characteristics and Components
7.3 Introduction to SAS Forecast Studio
7.4 Time Series Regression Models
7.5 Time Series Data and Hierarchical Data Structure
7.6 Recommended Reading
1
Chapter 7: Forecasting
7.1 Introduction
7.2 Time Series Characteristics and Components
7.3 Introduction to SAS Forecast Studio
7.4 Time Series Regression Models
7.5 Time Series Data and Hierarchical Data Structure
7.6 Recommended Reading
2
Objectives


3
Name some business applications of time series
modeling.
Define basic time series concepts and approaches.
Prediction in Time: Forecasting
You learned about statistical models to predict some
outcome variable (buy/no buy, revenue, payoff/default).
Sometimes it is more important to predict what a
particular variable will be in the future and at different
points in time.
In these situations, the data could be based on an
accumulation of measurements from customers
(revenue), a physical process (customer service wait
times), or even a technological phenomenon (demand on
a server).
4
Prediction in Time: Forecasting
The data for forecasting is known as a time series. Hence,
the name time series forecasting refers to the general
modeling approach.
Time series forecasting involves the prediction of future
values of a response or the interpretation of what
produced changes that were observed in a series over
time.
5
Examples of Forecasting in Business
Units in inventory
Demand on a system
Customer activity
Revenue
Transactions
Manufacturing supplies
Pricing
6
How many big-screen
TVs are you likely to sell
this week?
Examples of Forecasting in Business
Units in inventory
Demand on a system
Customer activity
Revenue
Transactions
Manufacturing supplies
Pricing
7
Should you use this shelf
space for more peanut
butter or for more salsa?
Examples of Forecasting in Business
Units in inventory
Demand on a system
Customer activity
Revenue
Transactions
Manufacturing supplies
Pricing
8
What time of day
produces peak server
demand? Can you
allocate more resources
at that time?
Examples of Forecasting in Business
Units in inventory
Demand on a system
Customer activity
Revenue
Transactions
Manufacturing supplies
Pricing
9
How many tables can
you expect to fill at your
restaurant on Valentine’s
Day?
Examples of Forecasting in Business
Units in inventory
Demand on a system
Customer activity
Revenue
Transactions
Manufacturing supplies
Pricing
10
If you put the item on sale
this week, will demand go
down next week?
Examples of Forecasting in Business
Units in inventory
Demand on a system
Customer activity
Revenue
Transactions
Manufacturing supplies
Pricing
11
How much in ticket sales can
you expect on Thursday?
Examples of Forecasting in Business
Units in inventory
Demand on a system
Customer activity
Revenue
Transactions
Manufacturing supplies
Pricing
12
Is there a cyclical pattern to
the number of purchases
made on your Web site over
a week?
Examples of Forecasting in Business
Units in inventory
Demand on a system
Customer activity
Revenue
Transactions
Manufacturing supplies
Pricing
13
When should you reorder
raw materials?
Examples of Forecasting in Business
Units in inventory
Demand on a system
Customer activity
Revenue
Transactions
Manufacturing supplies
Pricing
14
What are the pricing trends in
the past quarter, compared to
the previous three years?
Idea Exchange
Name a specific example variable that you might want to
forecast. Would you want to have daily forecasts?
Weekly? Yearly?
What type of data would you be able to access to obtain
forecasts?
15
Example: Singapore Unemployment
16
Example: Singapore Unemployment
The time series includes information that
 is gathered over time
 is for equally spaced time intervals
 uses the same measurement at each time
 enables the visualization of a pattern over time
 enables the quantification of such patterns
 enables forecasts to be made for future time points
based on past behavior.
17
Example: Ice Cream
You are CEO of a large ice cream producer.
Profitability depends on accomplishing goals in three key
areas:
 Supply chain activities for the coming year must be
coordinated and started.
 Production schedules must be set for the next three
months.
 Strategic pricing initiatives and
promotional campaigns need to
be assessed and approved.
Consider the key components of
a time series.
18
Ice Cream Demand
19
Ice Cream Demand: Seasonal Cycle
20
Ice Cream Demand: Trend
21
Ice Cream Demand: Effects of Independent
Variables
22
Ice Cream Demand
By evaluating and quantifying the effects described for the
ice cream demand example, you can do the following:
 forecast with some confidence how much ice cream
you are likely to sell each month (and hence how
much you should produce)
 make choices about when you should make a special
promotion (to uplift an anticipated sales slump)
 estimate how much difference
those promotions are likely
to make
 identify when something
unexpected occurred (such as an
undiscovered competitor taking
market share)
23
Two Basic Approaches in Time Series Analysis


24
Inference-based: what happened
– Policy or intervention evaluation
– Marketing mix evaluation
– Scenario evaluation or sensitivity analysis
Forecasting-based: what is likely to happen
– Logistical decisions
– Tactical decisions
– Strategic decisions
Two Basic Approaches in Time Series Analysis


25
Inference-based: what happened
– Policy or intervention evaluation
– Marketing mix evaluation
– Scenario evaluation or sensitivity analysis
Forecasting-based: what is likely to happen
– Logistical decisions
– Tactical decisions
– Strategic decisions
7.01 Poll
Time series forecasting is concerned only with obtaining
good forecasts of future values and not with
understanding why a series changed.
 Yes
 No
26
7.01 Poll – Correct Answer
Time series forecasting is concerned only with obtaining
good forecasts of future values and not with
understanding why a series changed.
 Yes
 No
27
Idea Exchange
Consider the example that you gave of a forecasting
variable earlier. Are you more interested in inferencebased analysis, or forecast-based analysis? Or both?
Why?
Give specific examples.
28
Chapter 7: Forecasting
7.1 Introduction
7.2 Time Series Characteristics and Components
7.3 Introduction to SAS Forecast Studio
7.4 Time Series Regression Models
7.5 Time Series Data and Hierarchical Data Structure
7.6 Recommended Reading
29
Objectives



30
Explain basic time series concepts and approaches.
List the elements of a time series.
Provide examples of time series models.
The Universal Time Series Model
Yt  f (Tt , St , X t , Et )
TREND
INPUT
SEASONAL
31
ERROR (Irregular)
Airline Passengers 1990-2004
32
Airline Passengers 1994-1997
33
Statistical Time Series
A statistical time series is
an indexed set of numbers.
The index can consist of
dates or other numbers.
Many business time series
are equally spaced.
A time series is equally
spaced if any two
consecutive indices have
the same interval time
difference.
34
Interval=1 month
Equally Spaced Time Series
Equally spaced time series
Equally spaced time series
with missing values
Unequally spaced time series
35
7.02 Multiple Choice Poll
Time series data must be
a. equally spaced data with no missing times
b. equally spaced, with missing values padded in the
response column, if necessary
c. equally or unequally spaced, as long as missing
intervals are indicated by either missing values or a
skip in the time index column.
36
7.02 Multiple Choice Poll – Correct Answer
Time series data must be
a. equally spaced data with no missing times.
b. equally spaced, with missing values padded in the
response column, if necessary.
c. equally or unequally spaced, as long as missing
intervals are indicated by either missing values or a
skip in the time index column.
37
The Universal Time Series Model
Yt  f (Tt , St , X t , Et )
TREND
INPUT
SEASONAL
38
ERROR (Irregular)
Airline Passengers 1994–1997: Trend
39
Time Series Trend
Trend usually refers to a deterministic function of time.
 Time series can be made of deterministic and
stochastic components.
 A stochastic component is subject to random variation
and can never be predicted perfectly except by
chance.
 A deterministic component exhibits no random
variation and can be predicted perfectly. Common
deterministic trend functions include linear trend,
curvilinear trend, logarithmic trend, and exponential
trend.
40
Deterministic Trend Models
Linear Trend
Yt  0  1t
Y
t
Quadratic Trend
Yt  0  1t  2t
2
Y
t
41
Notation
Yt  0  1t
Time index
Time series
42
Parameters
Time index
Stochastic Trend Models
Random Walk
Yt  Yt 1  Et
Random Walk with Drift
Yt    Yt 1  Et
43
continued...
Accommodating Stochastic Trend: Differencing
A First Difference of the Random Walk Process
Yt  Yt 1  Et
Yt  Yt  Yt 1
44
First Difference
7.03 Poll
Deterministic trends are accommodated in time series
models through differencing.
 Yes
 No
45
7.03 Poll – Correct Answer
Deterministic trends are accommodated in time series
models through differencing.
 Yes
 No
No. Stochastic trends are accommodated through
differencing.
46
The Universal Time Series Model
Yt  f (Tt , St , X t , Et )
TREND
INPUT
SEASONAL
47
ERROR (Irregular)
Airline Passengers 1994–1997: Seasonal
August
February
48
Seasonality
The seasonal component of a time series represents the
effects of seasonal variation.
 The foundation of seasonal variation is one or more
of the cycles produced by the motion of the celestial
bodies in the solar system, dominated by the earth
circling the sun every year. Another influential activity
is the moon circling the earth approximately every
28 days.
 The most general meaning of seasonality is a
component that describes repetitive behavior at known
seasonal periods. If the seasonal period is integer S,
then seasonal factors are factors that repeat every
S units of time.
49
Accommodating Seasonal Components




50
Trigonometric functions (sine waves)
Seasonal dummy variables
Seasonal differences (Box-Jenkins modeling)
Seasonal model components (ESM models)
Dummy Variables



A dummy variable is an indicator variable.
To indicate a specific time point, a dummy variable
takes one as the value for that time point.
At all other time points, it takes zero as the value.
1 when t  Sep 2001
It  
0 otherwise
51
Seasonal Dummy Variables
For a time series with S seasons, there are S dummy
variables, one for each season.
Monthly Data: IJAN , IFEB ,…, IDEC
Daily Data: ISUN , IMON ,…, ISAT
Quarterly Data: IQ1 , IQ2 , IQ3 , IQ4
52
Stochastic Seasonal Functions: Seasonal
Differencing
For seasonal data with period S, express the current
value as a function that includes the value S time units in
the past.

Yt = Yt-S + TRENDt + IRREGULARt

SYt = Yt  Yt-S is called a difference of order S.
Examples:
53

Monthly: This January is a function of last January
and so on.

Daily: This Sunday is a function of last Sunday
and so on.
7.04 Poll
Seasonal data can be accommodated through
differencing.
 Yes
 No
54
7.04 Poll – Correct Answer
Seasonal data can be accommodated through
differencing.
 Yes
 No
55
The Universal Time Series Model
Yt  f (Tt , St , X t , Et )
TREND
INPUT
SEASONAL
56
ERROR (Irregular)
The Irregular Component



57
The irregular component of a time series is what
remains when trend, seasonal, and input effects are
removed.
The irregular component need not represent a random
sequence of uncorrelated values. However, most
models specify that the irregular component must be
stationary.
A stationary time series has a constant mean and
variance at all time points.
Additive Decomposition of the Airline Data
T: Linear
Trend
S: Seasonal
Average
I: Irregular
Component
58
Analysis of Residuals (Forecast Error)
Residuals for Additive Decomposition Model
3000000
2000000
1000000
0
-1000000
1
4
7 10 13 16 19 22 25 28 31 34 37 40 43 46
-2000000
-3000000
Time Index
59
The Universal Time Series Model
Yt  f (Tt , St , X t , Et )
TREND
INPUT
SEASONAL
60
ERROR (Irregular)
Airline Passengers 1990-2004
Events
61
Event Examples











62
Retail promotions
Advertising campaigns
Negative article in a major publication
Nickel Beer Thursday
Mergers and acquisitions
Government legislated policy changes
Organizational personnel and/or policy changes
Christmas
Strikes
Scandal
Injury, illness, or death of a key player
(such as a CEO, CFO, or chief scientist)
How Do Event Variables Improve Accuracy?
63

Event variables enable the forecast model to
accommodate discrete shifts, also called jumps
or bangs, in time series data.

Event variables in time series models are primarily
intercept shifters.

Intercept shifters are included in the model as
explanatory variables and are based on columns
of 0s and 1s in the data set.
How Do Event Variables Improve Accuracy?
The data is fit with a linear model: salest     trendt
Bias
Data jump at Date = T* causes
a large residual.
64
How Do Event Variables Improve Accuracy?
The linear model can be refined by modifying the
intercept term as follows:
salest  (    D)   trendt
D  1 if Date T* and 0 otherwse
When Date = T*, the model’s intercept = ( + ),
and when Date ≠ T*, the model’s intercept = .
65
Event Variable Creation
BigStormEvent
T* = '01AUG2003'd
Demand History
For Sales
01JAN2002
01FEB2002
…
01JUL2003
01AUG2003
01SEP2003
…
01JUN2003
Resulting Dummy
Column = D
0
0
…
0
1
0
…
0
The temporary intercept shift is accomplished by adding
a 0-1 or dummy column to the data.
66
How Do Event Variables Improve Accuracy?
The data is fit with a linear model and a pulse event
variable.
salest  (   D)   trend
Less biased forecast
The residual is much smaller.
67
Event Variable Qualifiers
68

The event variable discussed above is a pulse type.

The pulse event variable qualifies variation in the data
as follows:
– There is a discrete shift in the data at Date = T*.
Before and after Date = T*, the series is at its
steady-state intercept and slope.
– That is, the series is impacted only for one time
interval: Date = T*.

How might the linear model be refined if the shift in the
data resembles what is depicted on the next slide?
How Do Event Variables Improve Accuracy?
The data is fit with a linear model.
salest     trend
A permanent Intercept shift at this date
69
How Do Event Variables Improve Accuracy?
The linear model can be refined by modifying the
intercept term as follows:
salest  (   D)   trendt
D  1 if Date T* and 0 otherwse
When Date => T*, the model’s intercept = ( + ),
and when Date < T*, the model’s intercept = .
This is the same model specification as before, but
the dummy column is changed as shown on the next
slide.
70
Event Variable Creation
New Law Enacted
T* = '01AUG2003'd
Demand History
For Sales
01JAN2002
01FEB2002
…
01JUL2003
01AUG2003
01SEP2003
…
01JUN2003
Resulting Dummy
Column = D
0
0
…
0
1
1
…
1
The permanent intercept shift is accomplished by
adding a 0-1 or dummy column to the data.
71
How Do Event Variables Improve Accuracy?
The data is fit with a linear model and a step event
variable.
salest  (   D)   trend
The permanent shift is accommodated in the model.
72
Event Variable Qualifiers


73
The event variable discussed above is a step type.
The step event qualifies variation in the data as
follows:
– There is a discrete shift in the data at Date = T*.
Before Date = T*, the series is at its pre-event,
steady-state intercept. When Date => T*, the series
it at a new, steady state intercept.
– That is, the series is impacted permanently; on and
after Date = T*, the series has a new intercept.
Basic Event Variable Types
74
Idea Exchange
Compare the use of event variables for events that can be
foreseen (such as Christmas holiday) to events that
cannot be foreseen (such as a major storm).
How would these two types of events change the
usefulness of your forecasts?
How would they change how you would make business
decisions based on the forecasts?
75
Chapter 7: Forecasting
7.1 Introduction
7.2 Time Series Characteristics and Components
7.3 Introduction to SAS Forecast Studio
7.4 Time Series Regression Models
7.5 Time Series Data and Hierarchical Data Structure
7.6 Recommended Reading
76
Objectives


77
Create a project and generate forecasts for a single
series.
Explain the basics of navigating SAS Forecast Studio
and interpreting results.
SAS Forecast Studio
78
SAS Forecast Studio: Interface Tour
79
SAS Forecast Studio: Interface Tour
Menu Bar and Shortcut Buttons
80
SAS Forecast Studio: Interface Tour
Menu Bar and
Shortcut Buttons
81
SAS Forecast Studio: Interface Tour
The Active Series
Overview
Panel
82
SAS Forecast Studio: Interface Tour
The Four View Tabs
83
SAS Forecast Studio: Interface Tour
The Forecasting View
84
SAS Forecast Studio: Interface Tour
The Modeling View
85
SAS Forecast Studio: Interface Tour
The Modeling View
MSL
The Model Selection List (MSL) is associated
with the highlighted series.
86
SAS Forecast Studio: Interface Tour
The Series View
87
SAS Forecast Studio: Interface Tour
The Scenario
Analysis View
88
89
Accommodate data updates
Refine forecasting objectives
Disseminate observed results
Apply forecast overrides
Assess observed results
Run analysis
Reconcile forecasts
Apply analysis and generate forecasts
Accumulate series; create the hierarchy
Repair series
Validate series and hierarchy
Select series; specify the data hierarchy
Define forecasting objectives
The Forecasting Workflow
Forecasting workflow
Large-Scale Forecasting Scenario
80% can be forecast automatically.
10% requires extra effort.
10% cannot be forecast accurately.
Time Series Data
90
...
Large-Scale Forecasting Scenario
80% can be forecast automatically.
10% requires extra effort.
10% cannot be forecast accurately.
Time Series Data
91
SuperToys Inc.
SuperToys Inc. ran a campaign to promote sales of a
classic line of dolls.
 Your job is to measure the impact of the promotion
and determine whether the promotion should be run in
the future, perhaps to promote Christmas sales.
 Forecast the sales for the next several weeks and
quantify the effect of the discount promotion on weekly
sales.
92
The Data
REG2_GBTOYS is a time series data set
with the following:
 weekly data for a popular doll in all toy
stores averaged over four sales regions
 the number of units sold per region
each week (units)
 information about when special
discount promotions were
implemented (pctpromo)
93
Generating Forecasts
Automatically
Toy Case Study
Task: Use the REG2_GBTOYS data to forecast
a single series with a discount promotion.
94
Use of Accuracy Criteria
Two ways to judge accuracy:
 Accuracy can be calculated for one-step-ahead
forecasts over the entire range of the data.
 Accuracy can be calculated for a holdout sample of
data at the end of each time series that was not used
to construct models. A time series might be too short
to enable use of a holdout sample. This method is
preferred, but it is often not feasible. Using a holdout
sample to judge accuracy is often referred to as
honest assessment because it simulates fitting and
deploying a model and then judging accuracy in the
live environment.
95
Assessing Generated Models
Toy Case Study
Tasks: Compare different candidate models
to select the best one, and evaluate
the parameter estimates produced by
the model.
96
Creating a Scenario Analysis
Toy Case Study
Task: Create a scenario analysis that
evaluates the effect of a promotional
campaign on future forecasts.
97
Idea Exchange
You could do more with scenario analysis. For example,
if management wants to clear 250 extra dolls from
inventory, how many weeks of sales promotion would be
needed to sell 250 above and beyond the baseline
forecast?
98
Exercise
This exercise reinforces the concepts discussed
previously.
99
Chapter 7: Forecasting
7.1 Introduction
7.2 Time Series Characteristics and Components
7.3 Introduction to SAS Forecast Studio
7.4 Time Series Regression Models
7.5 Time Series Data and Hierarchical Data Structure
7.6 Recommended Reading
100
Objectives



101
Describe the basic assumptions of static regression
modeling.
Explain the basics of dynamic regression models.
Define the role of transfer functions in time series
regression models.
Static Regression
In static (non-time series) regression analysis, the
predictors and the response are assumed to occur
together in time.
DISCOUNT(today)  INCREASED SALES(today)
102
Static Regression
However, it might be more important to understand how
predictors affect a response at a different time.
DISCOUNT(today)  INCREASED SALES (today) and
DECREASED SALES (tomorrow)
103
Static Linear Regression
Assumptions
 The predictor variables are known and measured
without error.
 The functional relationship between inputs and target
is linear.
 The error term represents a set of random variables
that are independent and identically distributed with a
normal distribution having a mean of 0 and a variance
of σ2.
104
From Static Regression to Time Series
Regression
The time series regression model is an extension of the
static regression model in which
 variables are observed in time
 autocorrelation is allowed
 the target variable can be influenced by past values of
inputs.
105
Time Series Regression Terminology
Ordinary Regressor
 An input variable that has only a concurrent influence
on the target variable: X at time t is correlated with Y
at time t. Variation in X at times before and after t is
uncorrelated with Y at time t.
Dynamic Regressor
 An input variable that influences the target variable at
current and future values: variation in X at time t can
influence Y at time t, t + 1, t + 2, ….
Transfer Function
 A function that provides the mathematical relationship
between a dynamic regressor and the target variable.
106
7.05 Multiple Choice Poll
Dynamic regressors require special treatment because
they
a. change value frequently.
b. relate to the response at time t, and at subsequent
times as well.
c. cannot be known in advance.
107
7.05 Multiple Choice Poll – Correct Answer
Dynamic regressors require special treatment because
they
a. change value frequently.
b. relate to the response at time t, and at subsequent
times as well.
c. cannot be known in advance.
108
Types of Regressors: Measurement Scale
Binary (Dummy) Variables
 Take the value 0 or 1
 Can be used to quantify nominal data
Categorical Variables
 Nominal scaled  nonquantitative categories
 Ordinal scaled variables can be treated as categorical
 Must be coded into a quantitative input, usually using
a form of dummy coding for each level (less one if a
constant term is used in the model)
Quantitative Variables
 Interval or ratio scaled
 Can be transformed
109
Types of Regressors: Randomness
Deterministic
 Controlled by experimenter
 Can be perfectly predicted without error
Stochastic
 Governed by unknown probability distributions
 Cannot be perfectly predicted
110
Advertising Case Study
An online retail firm advertises in several media channels.
With an ever-changing electronic marketplace, you must
determine how to best allocate your advertising budget.
Find the optimal mix of advertising spending across
Internet
Print media
111
Television
Radio
Direct mail
The Data
Predictor Variable
Description
DirectMail
Weekly direct mail advertising (x$1000)
Internet
Weekly Internet advertising (x$1000)
PrintMedia
Weekly print media advertising (x$1000)
SalesRatio
Ratio of competitor sales to total known sales
TVRadio
Weekly TV/radio advertising (x$1000)
Response Variable
SalesAmount
112
Description
Total sales revenue for all customers (x$1000)
Comparing Advertising
Effectiveness
Advertising Case Study
Task: Compare the effectiveness of different
advertising channels, estimating the
increase per dollar spent on direct
mailings, Internet ads, print media ads,
and TV/radio airtime.
113
Chapter 7: Forecasting
7.1 Introduction
7.2 Time Series Characteristics and Components
7.3 Introduction to SAS Forecast Studio
7.4 Time Series Regression Models
7.5 Time Series Data and Hierarchical Data
Structure
7.6 Recommended Reading
114
Objectives




115
Explain the process of converting time-stamped data
into time series data: accumulation.
Describe various accumulation options in the software.
Explain the process of building the data hierarchy.
Describe various aggregation options in the software.
Transactional Data Time Binning
Monthly Time Bins – Only the past two years are shown.
116
Some time bins have no recorded observations.
Some time bins have more than one observation.
Producing Time Series Data
Data Accumulation
 Accumulates transactional data to the specified time
interval of the data
Data Aggregation
 Generates time series
data for upper levels
(by groups) of the data
hierarchy
117
Accumulating Unequally Spaced Data



118
Time-stamped transactional data is rarely spaced
equally.
Transactional data can be accumulated to make it
spaced equally.
There are several accumulation options, including the
following:
– Total (sum over accumulated period)
– Average
– Median
– Minimum or Maximum
– First or Last
– Others based on summary statistics (STD, CSS,
USS, N, NOBS, NMISS)
Transactional Data Accumulation
For this time-stamped data, accumulating on a monthly
average basis is different from accumulating on a
total basis.
ACCUMULATE=TOTAL
ACCUMULATE=AVERAGE
Choose an accumulation method that makes sense given
your series.
119
Producing Time Series Data
Data Accumulation
 Accumulates transactional data to the specified time
interval of the data
Data Aggregation
 Generates time series
data for upper levels
(by groups) of the data
hierarchy
120
7.06 Multiple Answer Poll
Choose the statements below that are correct.
a. Data aggregation entails combining different series to
form a hierarchy.
b. Data accumulation entails combining different series
to form a hierarchy.
c. Data aggregation entails rolling up more frequent time
intervals to produce fewer intervals.
d. Data accumulation entails rolling up more frequent
time intervals to produce fewer intervals.
121
7.06 Multiple Answer Poll – Correct Answers
Choose the statements below that are correct.
a. Data aggregation entails combining different series to
form a hierarchy.
b. Data accumulation entails combining different series
to form a hierarchy.
c. Data aggregation entails rolling up more frequent time
intervals to produce fewer intervals.
d. Data accumulation entails rolling up more frequent
time intervals to produce fewer intervals.
122
Data Hierarchies: Aggregation
Data in the middle and upper levels of the hierarchy is
constructed from data in the base level of the hierarchy.
Above, group-level data is created by adding together
department-level series. The top level (for example, total
sales) is created by adding all base-level series.
123
BY Variables in Hierarchical Data
124

BY variables group observations that have the same
value for the BY variable.

Assigning a BY variable enables you to obtain
separate analyses for groups of observations.

For hierarchical time series, the order of the BY
variables describes the structure of the hierarchy.
Aggregated Data
The group and value series are constructed from the
accumulated dept series.
The chart is an abstract representation of the hierarchy.
125
Wine Case Study
WINECO has, until recently, focused on value (or jug)
wines. The CEO thinks that there is room in the market for
higher-end wine sellers and seeks to change WINECO’s
focus from value wines to small, vintage wines.
Problem: How to price vintage wines
 There is not a long history, and demand for
small wines is more volatile.
 Can the CEO find a reasonable pricing
structure that the market can bear and that
WINECO can profit from?
 What types of promotions attract buyers
without WINECO taking a huge financial hit?
126
Forecasting Objectives and Analytical Tasks





127
Accumulate base-level transactional series to time
series data.
Aggregate base level time series data to create the
wine data hierarchy.
Automatically generate candidate models
for each series and select the best one as
forecast specification.
Generate forecasts for each series.
Assess price, holiday, and promotional
effects on selected series.
The Data




128
The data is weekly case sales of wine from a wine
distribution company from January 17, 2004, to
May 26, 2007.
The data hierarchy has three levels: Type
(base level), Region, and Total Sales.
There are four aggregate wine types:
tblred (table red), tblwt (table white),
value, and vintage (limited production).
There are four regions: reg1 through reg4.
The Business Problem: Maximize Profit




129
It is assumed that profit is maximized when the
following conditions are met: wine sales are
maximized and inventory costs are minimized.
Wine sales are maximized when there are
no lost sales due to wine being out of stock.
Inventory costs are minimized when
inventories are kept as small as possible
while still satisfying demand.
Accurate forecasts of wine demand over wine
types and distribution regions are essential
components in a profit-oriented business strategy.
Creating the Project for
Hierarchical Forecasting
Wine Case Study
Tasks: Create the project for the WINECO
data and begin the process of
performing hierarchical forecasting.
130
Retail Forecasting Reconciliation Approaches
Company
Top-down
Warehouse
Store
Company
Middle-out
Warehouse
Store
Company
Bottom-up
Warehouse
Store
131
Generating Forecasts of Wine
Demand
Wine Case Study
Task: Perform middle-out reconciliation of
the WINECO forecasts.
132
Exercise
This exercise reinforces the concepts discussed
previously.
133
Disaggregation: Forecast Proportions
Reconcile Bottom to Middle
Value
45
Region
Type
134
20
8
+5
25
4
+3
8
+2
12
+3
The Reconciled Forecasts
Value
45
Region
Type
135
20
13
25
7
10
15
Reconciling Forecasts
Wine Case Study
Task: Update the forecasts in each series to
account for the effect of reconciliation.
136
Assessing Price and
Promotional Effects on
Vintage Type Wines
Wine Case Study
Task: Interpret the parameter estimates for the
final model with respect to the effects of
various promotions.
137
Chapter 7: Forecasting
7.1 Introduction
7.2 Time Series Characteristics and Components
7.3 Introduction to SAS Forecast Studio
7.4 Time Series Regression Models
7.5 Time Series Data and Hierarchical Data Structure
7.6 Recommended Reading
138
Recommended Reading
May, Thornton. 2010. The New Know: Innovation
Powered by Analytics. New York: Wiley.
 Chapters 6 through 8
139