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

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


1 ACCEPTED SOLUTION

Accepted Solutions
udo_sas
SAS Employee

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

3 REPLIES 3
udo_sas
SAS Employee

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

Burch123
Calcite | Level 5

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.

udo_sas
SAS Employee

Hello -

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

Thanks,

Udo

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
  • 1101 views
  • 0 likes
  • 2 in conversation