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

If I run this code:

proc sort data=dataname;
where Month in (1,2,3);
where also Day in (1,2,3);
by Hour;
run;

proc reg data=dataname;
where Month in (1,2,3);
where also Day in (1,2,3);
model Y=X;
by Hour;
run;

And I get Regression results for every hour.

Is there a way I can output slope of X for every hour into a new table or whatever? Anything just so I don't have to manually copy the slope (Parameter Estimates) into notepad?

1 ACCEPTED SOLUTION
2 REPLIES 2
Reeza
Super User
ods output ParameterEstimates=PE_Table;
proc reg data=dataname; where Month in (1,2,3) and Day in (1,2,3);
by Hour; model Y=X; run;

 

Another method is using the ODS OUTPUT statement, this approach allows you to capture almost any ODS output and then reformat into the output you'd like. 

https://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2 replies
  • 773 views
  • 0 likes
  • 3 in conversation