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

Hello guys i am using following codes but these are not working well as they are not efficient and taking too long.  can someone help me with more efficient codes which can sever the saem puppose. thanks

 

proc reg data=US2 outest=period94_97 edf;
where datadate between '31JAN1991'd and '31DEC1993'd;
model ret= retm;
by conm; run; quit;

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

If you are doing this in a non-batch environment, then ODS graphics is on. If the BY variable has many levels, then most of the time is spent creating/printing tables and graphics. 

 

Yes, the PROC REG statement supports a NOPRINT option. 

If you want only want parameter estimates, and related statistics, use the OUTEST= option as you are doing.

If you want also want predicted values and residuals, you can use the OUTPUT statement.

 

I suggest 

 

proc reg data=US2 outest=period94_97 edf NOPRINT;
where datadate between '31JAN1991'd and '31DEC1993'd;
model ret= retm; 
by conm;
quit;

You can read about the NOPRINT option and other ways to suppress ODS in SAS.

 

 

View solution in original post

9 REPLIES 9
Reeza
Super User

Define not working. 

raqthesolid
Quartz | Level 8

it continue to show that it is doing something for hours. i waited more than hour but nothing came up. is there any way to do it simply or putting something like noprint so that it just create the tables in libray and not the graphes and other in print window. 
thanks 

Kurt_Bremser
Super User

First of all, reduce your dataset size until you get it working in a reasonable timespan. Then you can use options fullstimer to get a feel for the problem.

Could you provide some info about your SAS machine (CPU, memory, storage setup)

Reeza
Super User

How big is your data? 

 

Look at ODS SELECT to limit the output. 

Rick_SAS
SAS Super FREQ

If you are doing this in a non-batch environment, then ODS graphics is on. If the BY variable has many levels, then most of the time is spent creating/printing tables and graphics. 

 

Yes, the PROC REG statement supports a NOPRINT option. 

If you want only want parameter estimates, and related statistics, use the OUTEST= option as you are doing.

If you want also want predicted values and residuals, you can use the OUTPUT statement.

 

I suggest 

 

proc reg data=US2 outest=period94_97 edf NOPRINT;
where datadate between '31JAN1991'd and '31DEC1993'd;
model ret= retm; 
by conm;
quit;

You can read about the NOPRINT option and other ways to suppress ODS in SAS.

 

 

raqthesolid
Quartz | Level 8

Dear i tried this nonprint option as you wrote but it took almost the same time. how can i stop all the graphics ? 

 

Rick_SAS
SAS Super FREQ

As it says in the article that I linked to, the NOPRINT option also suppresses the graphics. When you use the NOPRINT option, you should see no output of any kind.

 

With only one regressor, this PROC REG statement should be very fast. Please answer the following questions:

  1. Are there any NOTES or WARNINGs in the SAS log?
  2. How many distinct levels of the BY variable are being used?  
  3. Is the PROC REG code that you showed the actual code that you are submitting, or are there additional options that you are not showing?
  4. How many observations are used? (= number of observations included by the WHERE clause)
raqthesolid
Quartz | Level 8

there are no warnings or log reports on it becuase it remain busy as long as i see for more than hours,

my whole date has about 387323 observaton for 20 years current where statement includes only 3 years,

i am using the same codes as i shown you 

by variable is company names and there are more than 1000 companies. 

 

raqthesolid
Quartz | Level 8
Thank you very much i just realized that i was using run after quit; get rid of that and it worked with noprint. thinks again

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!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 9 replies
  • 2205 views
  • 0 likes
  • 4 in conversation