Forecasting using SAS Forecast Server, SAS/ETS, and more

HPFDiagnose Format

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

HPFDiagnose Format

Hello!

I was wondering if anyone can help!?

This HPFDIAGNOSE procedure is taking far too long and sometimes freezing completely. Have I coded something incorrectly? CPU and storage space are of no issue and all other operations run fine.

I have four datasets; essentially all to be passed through the HPFDIAGNOSE procedure.

1. The time series dataset has various products, all with about 1000 observations of sales (some missing, some present)

2. The Auxillary Dataset has Date (to be matched against the time series dataset) and trading hours as a continuous variable

3. The Event dataset contains about 300 events

4. The Event by dataset contains approx 20 events, by "PRODUCT_NUMBER"

These take the format of:

1. (Time Series Dataset)  XXXX.TIME_SERIES

PRODUCT_NUMBER (8.0)DATE (DATE9.)SALES (10.2)
123401MAR20147
123402MAR20148
198884423APR201412
.........

2. (Trading Hours Dataset) XXXXX.TRADING_HOURS

DATE (DATE9.)TRADING_HOURS(8.2)
01APR20096.7
02APR20097.2
03APR20098.1
04APR20097.6

3.(Event Dataset) XXXXXX.EVENT_DATASET (AS PER HPF EVENTS)

_NAME__CLASS__KEYNAME__STARTDATE_...
PROMOTIONSIMPLE.01APR2009...
PROMOTIONSIMPLE.07NOV2014...
CHRISTMASSIMPLE.25DEC2014...

4.(Event BY Dataset) XXXXXX.EVENT_DATASET_BY_PRODUCT

PRODUCT_NUMBER_EVENT__NAME__REQUIRED_
1234PROMOTIONSALESYES(POSITIVE)
1234CHRISTMASSALESMAYBE

I've placed into the following:

%MACRO MODEL_SELECTION;

ARIMAX;

IDM;

UCM;

ESM;

%MEND MODEL_SELECTION;

PROC HPFDIAGNOSE

DATA=TIME_SERIES

MODELREPOSITORY=REPOSITORY_SAMPLE

AUXDATA=TRADING_HOURS

OUTEST=ESTIMATORS

OUTOUTLIER=OUTLIERS

INEVENT=EVENT_DATASET EVENTBY=EVENT_DATASET_BY_PRODUCT;

ID DATE INTERVAL=DAY;

FORECAST SALES;

INPUT TRADING_HOURS /REQUIRED=MAYBE;

BY PRODUCT_NUMBER;

%MODEL_SELECTION;

RUN;

Any help would be greatly appreciated!?

Kind Regards,

Chris



Accepted Solutions
Solution
‎06-09-2014 05:14 PM
SAS Employee
Posts: 416

Re: HPFDiagnose Format

Hello -

You may try without UCM and see if this improves performance. If you run into crashes (like freezing runs) you best bet is to contact Technical Support, as this might be data related.

Thanks,

Udo

View solution in original post


All Replies
Solution
‎06-09-2014 05:14 PM
SAS Employee
Posts: 416

Re: HPFDiagnose Format

Hello -

You may try without UCM and see if this improves performance. If you run into crashes (like freezing runs) you best bet is to contact Technical Support, as this might be data related.

Thanks,

Udo

New Contributor
Posts: 2

Re: HPFDiagnose Format

Udo,

Thanks for this, really great help.

I've just realised, I may have misinterpreted the INEVENT= and BYEVENT= functions and was wondering if you could help.

Suppose I have two time series to forecast, I only want the events in the BYEVENT part to be diagnosed, however the HPFDIAGNOSE procedure appears to be using all events from the INEVENT dataset?

For example

Suppose Time Series X & Y,

and INEVENT= is the below table

_NAME_...
A...
B....
C...
D....
E....
F....
G....

and BYEVENT= is the below table

Times Series_EVENT__NAME_
XASALES
XBSALES
XCSALES
YDSALES
YESALES

So essentially, for time series X, I only want events A,B,C to be considered and subsequently for time series Y, D & E to be considered.

The way I have so far seems to be using all events for each "diagnose" loop for each "by" group.

My questions are:

     1) Have I structured something incorrectly?

     2) Is this how HPFDIAGNOSE works, and I have misinterpreted the procedure?

     3) If so, should I use a macro and call the events into the HPFDIAGNOSE procedure.

Any help appreciated as always!

Kind Regards.

SAS Employee
Posts: 416

Re: HPFDiagnose Format

Hello -

This example might be useful: https://communities.sas.com/message/52133#52133

Thanks,

Udo

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 630 views
  • 0 likes
  • 2 in conversation