Desktop productivity for business analysts and programmers

Setup of 13 period data for forecasting

Reply
N/A
Posts: 0

Setup of 13 period data for forecasting

Hi all,
I am beginner user and need some help with sas enterprise guide for setting up a forecasting model.

In the simplest form my data has two fields one is called periods and lists periods as P1, P2 .... P13 ( 13 period year) and other field has values like 80 , 90 and so on. SInce I dont have a time ID when I do forecasting SAS suggest to create a new timeID but the problem is that I dont have an option to choose the interval that matches 13 periods everything exists in days, weeks months, quarters etc. HOw do I set this up.

I can possibly find out in a third field in the original table the number of days in each period but thats it, having this infomration alone can this problem be setup to do forecasting? Thanks very much in advance
Super Contributor
Super Contributor
Posts: 3,174

Re: Setup of 13 period data for forecasting

Using the character variable you do have PERIOD, assign an arbitrary SAS DATE variable, using the INTNX function supplying the numeric portion of your PERIOD value as the third argument - choose a starting date, possibly at the beginning of the current year: Some sample code is provided below, for illustration.

data _null_;
format StartDate yymmdd10.;
StartDate = INTNX('year',today(),0);
PdArg3 = Input( Substr('P2',2) , 2.); /* create INTNX third arg to increment date */
Attrib SamplePdStartDate format=yymm7. label='Time ID DATE var';
SamplePdStartDate = INTNX('month',StartDate,PdArg3);
putlog _all_;
run;


Scott Barry
SBBWorks, Inc.


Suggested Google advanced search argument, this topic/post:

+"enterprise guide" +"time id" +date +forecasting site:sas.com
Regular Contributor
Posts: 184

Re: Setup of 13 period data for forecasting

I think Faisal wants custom intervals, specifically WEEK4. But 13x28=364, so he has to specify how the one or two additional days are to be handled, and how the intervals align with year boundaries.
N/A
Posts: 0

Re: Setup of 13 period data for forecasting

This is great, thanks for this. This helps me find starting or ending dates for each period. But once I have that how can I use this in Enterprise guide forecasting models.

The reason I am thinking I cant use the starting or ending date as TimeID is becaz the values like 80,90 I have are cumulative for that period. So the value was added up for each day of that period to come up to 80, 90. It wasn't 80 on that day, in that case would it not be wrong to use the timeid that the intnx procedure gives me. If what I am thinking is correct that what aletrantive do I have tos et this up in enterprise guide preferably using the interface.

Faisal
Super Contributor
Super Contributor
Posts: 3,174

Re: Setup of 13 period data for forecasting

Sounds like you have an input-data requirement that cannot be satisfied with the summarized data you have today. I misunderstood and thought that you only needed a numeric variable representing a SAS DATE within each of the 13 periods.

You're in a pickle, my friend.

Scott Barry
SBBWorks, Inc.
SAS Employee
Posts: 149

Re: Setup of 13 period data for forecasting

My knowledge of the forecasting stuff is very limited, but what little exposure I've had to it is that time series analysis requires the starting data to be in really good shape. The good news is that Enterprise Guide does have a lot of great tools for manipulating data... I just don't know what specifically would need to be done with your data for forecasting purposes. I rarely recommend cross-posting, but you might ask this question on the forecasting forum if you don't get any additional responses here. If you cross-post, it may help to mention that you're using PROC FORECAST (that's the procedure behind Basic Forecasting... assuming that's the task you want in EG).

http://support.sas.com/forums/forum.jspa?forumID=28

You can also check with tech support, I'm sure they'll be able to get you what you need very quickly. As a reminder, unlimited free tech support comes with every SAS license.

http://support.sas.com/techsup/contact/

Wish I could be more help.
Ask a Question
Discussion stats
  • 5 replies
  • 113 views
  • 0 likes
  • 4 in conversation