BookmarkSubscribeRSS Feed
Jade_SAS
Pyrite | Level 9

Hi All,

 

    When I at the step 4 "Specify the properties of the Time Dimension of Your Data", I got the pop windows as attached. My question is, how to understand the pop up window message? Thank you!

 

Thanks,

Jadedate.JPG

8 REPLIES 8
Jennifer_beeman
SAS Employee

Hi,

Without looking at the data, my best guess:

This is saying that there are 75 different (unique) intervals in this data set.

The smallest interval is “.” (missing) (which i think means this occurs the least amount of times)

The largest interval is a R454YR interval as well as daily interval, occuring 20 % of the time.

 

My guess is that the data are daily with missings, and a possible by group has been omitted, But i have no way of deciphering without looking at it myself.  If you care to share the data I could do a rough pass with proc TIMEID

Perhaps you could try looking at the data visually, plotting using proc timeseries to see what you're dealing wth?

proc timeseries data=foo plot=series;

id date interval = ?? ; (interval IS required here)

var varname;

run;

 

otherwise, you'll have to look at the raw data (preferably sorted) to see what the gaps look like.

Sorry if this wan't must help, but it is quite difficult to diagnose a data set without the actual data.

Please feel free to reach out if you have more questions or wish to share more information about your data.

otherwise, it seems you will have to tell the window which interval you are wanting to use since it cannot definitively diagnose one on it's own.

Thank you

Jennifer

 

Jade_SAS
Pyrite | Level 9

Thank you for your reply!

 

There is apparently no missing in this data set, I could not nderstand that the smallest interval is missing. Is it because the data is not daily data at the hierarchy level?

 

My data is kind of like daily sale data at different store location and different departments, and I am dealing with the 10-day buy_then_return data for now.

 

I guess my question is usually how do people define the time interval, by forecast studio or other tools or procedures (like the coding you provided)? Thank you so much!

 

Jade

Jennifer_beeman
SAS Employee

proc timeid is what is being used in the background of this and it should be able to detect your interval assuming you hae set up the parameters correctly. It is possible that there are gaps in the data without actual missing values.

An example of this is as follows

 

01jan1999

02jan1999

03jan1999

04jan1999

06jan1999

 

If you notice, the date is never missing, BUT the date 05JAN1999 is not being observed either, hence it might signal as missing if the rest of the dates are daily.

 

Did you define the BY groups (STORE and LOCATION) prior to trying to detect an interval? that may take into account the differences between groups. Most users know the interval of their data, or have a general idea, which can help.

 

Have you tried plotting the series? I am not familiar with 10 day buy then return, but if you can give more information I am happy to continue to try to help.

 

thank you

Jennifer

 

Jade_SAS
Pyrite | Level 9

Thank you for the quick reply!

The data is daily, but it is not daily when group by department and location level for column "10-day buy then return", The data I am using right now is calculated the "10-day buy then return" column at department and location level.

 

when I run the coding below, I got an error said "observation with duplicate ID value found":

 

proc timeseries data=sale_TenDay_BuyReturn plot=series;

id date interval = Day;

var TenDay_BuyReturn;

run;

 

For example for 1/1/2016, I have the data for two different departments. How should I proceed now? Thank you!

 

Jade 

mitrov
SAS Employee

 

If I understand your data correctly, you either need to specify BY variables if you want to see each location and department combination individually, or you need to specify the accumulate= option if you want to see the total. Or both if you want to accumulate them at some other interval.  

 

So, either, for each department and location

proc timeseries data=sale_TenDay_BuyReturn plot=series;

id date interval = Day;

var TenDay_BuyReturn;

by department location;

run;

 

Or, for total daily data 

proc timeseries data=sale_TenDay_BuyReturn plot=series;

id date interval = Day;

var TenDay_BuyReturn / accumulate=total;

run;

 

Or, for monthly data per department and location:

proc timeseries data=sale_TenDay_BuyReturn plot=series;

id date interval = month;

var TenDay_BuyReturn / accumulate=total;

by department location;

run;

mitrov
SAS Employee

One additional comment. You say: 

The data is daily, but it is not daily when group by department and location level for column "10-day buy then return"

Forecast Server requires that the data in a project is all at the same frequency (interval). PROC TIMESERIES and PROC EXPAND can be used to convert data to the same frequency. The UI of FS uses PROC TIMESERIES to accumulate data at the same frequency. 

 

If you want to model data at different frequencies you need to create separate projects, one for each frequency. 

Jade_SAS
Pyrite | Level 9

The value of "TenDay_BuyReturn" is missing after I used the following proc expand coding, does it make sense? (for example: we have 1/1/2010, 1/3/2010...etc. data, after proc expand, the "sale_TenDay_BuyReturn" is missing for the added 1/2/2010 data.
)
Proc expand data=WORK.sale_TenDay_BuyReturn  out=WORK.sale_TenDay_BuyReturn from=day method=none;
   by department location;
   ID date;
Run;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 8 replies
  • 1053 views
  • 1 like
  • 3 in conversation