Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of...

38
Copyright © 2009 SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Statistics and Samples: Judging Time Series Models Automatically Udo Sglavo SAS Inc.

Transcript of Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of...

Page 1: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009 SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Statistics and Samples: Judging Time Series Models Automatically

Udo Sglavo

SAS Inc.

Page 2: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

What We Will Discuss Today

Is my forecast accurate?

Illustrative example

Reconciliation

Page 3: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Automatic Forecasting Process: The big picture

For details see the white paper

„Large-Scale Automatic Forecasting Using Inputs and Calendar Events’ by Michael Leonard

Page 4: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Example Series

Page 5: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Is This An Accurate Forecast?

Page 6: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Is This An Accurate Forecast?

Page 7: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Is This An Accurate Forecast?

Page 8: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Is This An Accurate Forecast?

Page 9: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Is This An Accurate Forecast?

Page 10: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Prediction Error Analysis

Initial Fit Statistics

• evaluate the initial model fit (fit region, in-sample)

Selection Statistics

• select between competing models (selection

region/hold out sample, in-sample)

Fit Statistics

• evaluate model fit for the selected model (fit region)

Performance Statistics

• evaluate model selection process for the selected

model (performance region, out-of-sample)

Page 11: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Regions

T= length of time series

H=hold-out region (in sample)

B=holdback region (out-of-sample)

Page 12: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

In-Sample Region Out-Sample

Region

Page 13: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Initial Fit Region Out-Sample

RegionSelection

Region

Page 14: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Initial Fit Region Out-Sample

RegionSelection

Region

“Train” “Validate” “Test”

Page 15: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Initial Fit Region

Page 16: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Selection

Region

Page 17: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Fit Region

Page 18: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Forecast

Horizon

Performance

Region

Page 19: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

What We Will Discuss Today

Is my forecast accurate?

Illustrative example

Reconciliation

Page 20: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Additive Winters Method Multiplicative Winters Method Seasonal Smoothing Method

Page 21: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Model Comparison Plot Selected Model Plot

Page 22: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Additive Winters Method Multiplicative Winters Method Seasonal Smoothing Method

Page 23: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Model Comparison Plot Selected Model Plot

Page 24: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Additive Winters Method Multiplicative Winters Method Seasonal Smoothing Method

Page 25: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Model Comparison Plot Selected Model Plot

Page 26: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Additive Winters Method Multiplicative Winters Method Seasonal Smoothing Method

Page 27: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Model Comparison Plot Selected Model Plot

Page 28: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

What We Will Discuss Today

Is my forecast accurate?

Illustrative example

Reconciliation

Page 29: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Prediction Error Analysis

Reconciliation Statistics

• Computed for the

predictions associated

with the selected

statistical time series

model or the

predictions associates

with the reconciled

predictions

Page 30: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Example Series

Masonry Electric

Workers

Page 31: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Example Series (H>0 B>0)

Masonry Electric

Workers

Page 32: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Example Series (H>0 B>0)

Bottom

Up

Reconciliation

Masonry Electric

Workers

Page 33: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Example Series (H>0 B>0)

Top

Down

Reconciliation

Masonry Electric

Workers

Page 34: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Better Example(H>0 B>0)

Top

Down

Reconciliation

Masonry Electric

Workers

Page 35: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Syntax: SAS High-Performance Forecasting

HOLDOUT=

• specifies the size of the holdout sample to be used for

model selection.

BACK=

• specifies the number of observations before the end of

the data that the multistep forecasts are to begin

Available in

• HPFDIAGNOSE (holdout, back)

• HPFSELECT (holdout)

• HPFENGINE(holdout, back)

• HPF (holdout, back)

Page 36: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

SAS Forecast Studio 3.1

Holdout Sample

Out-of-sample

Page 37: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Findings

Hold-out strategies are useful for judging time

series models automatically

We need to distinguish in-sample and out-of-

sample data

Out-of-sample data allows for an unbiased

performance evaluation of forecasting models

Ultimately we want to compare against “future

actual values” and re-adjust our models

Page 38: Statistics and Samples: Judging Time Series Models ......BACK= •specifies the number of observations before the end of the data that the multistep forecasts are to begin Available

Copyright © 2009, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. Copyright © 2008, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.