BookmarkSubscribeRSS Feed
greenhornblues
Calcite | Level 5

Greetings !

My Entry Level Quest(ion) is finding an iterative process for autoregressive forecasts.

Objectice: Create 155 customer forecasts and see estimates and p values of invovled variables

What I've done: I have created an autoregressive forecast for a customer, normalized its  history and pulled out the pvalue and estimates for the variables.

Help I need doing: I want to do this for 155 customers  (i.e CustomerID= 138,158, 37....)  and create a table for the variable estimates  and table for pvalues.

Attached: Is the SAS code (SASDOLOOP) and Excel Input File(Autoregression). In the Excel file I have in the last two tabs EstimateOutPut and Pvalue Output the desired format of the output results.

4 REPLIES 4
Reeza
Super User

Without reading your code or getting into the data, generally if you want to repeat a process for a specified set of groups you can use BY Group processing. Basically, stack your data together so you have a variable that identifies each customer, with everything else the same as it was before and then add a by line into your proc.

proc whateever;

BY Customer;

rest of the code is the same;

run;

greenhornblues
Calcite | Level 5

Thank you for your reply. If you are able to see my code, how  is that I can stack them according to Customer? Also can anyone tell me how to build a table specified above.

Reeza
Super User

Is your HDD_30_158 where 158 is your customer ID?

If so you'll need to transform the data so that is instead, but you have a lot of data and a bit of code and I don't have enough time to look into it further Smiley Sad

CUSTOMER HDD_30

158

252

greenhornblues
Calcite | Level 5

Excel File Down Here

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 546 views
  • 6 likes
  • 2 in conversation