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?
Use the OUTEST= option
Use the OUTEST= option
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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.