BookmarkSubscribeRSS Feed
aarony
Obsidian | Level 7

hi i ran a regressiona s below

proc reg data=m10; by year; model index1 = size ptb leverage roa fe1-fe3/adjrsq;

output out=o1 p=p1 r=rindex1; run; quit; 

the output window shows me the below by year (1991-2012):

                                   Parameter       Standard

              Variable     DF       Estimate          Error    t Value    Pr > |t|

              Intercept     1        0.74        0.36171       2.19      0.0299

              size          1       -0.146        0.04714      -3.14      0.0020

              ptb           1        0.213        0.16899       1.20      0.2308

              leverage      1        0.736        0.41730       2.33      0.0208

              ROA           1        2.150        1.11145       1.96      0.0514

              fe1           1        0.173        0.16625       0.25      0.8021

              fe2           1       -0.831        0.21504      -1.30      0.1939

              fe3           1       -0.886        0.16088      -5.09      <.0001

how do i output this table for each year?

thank you so so much

1 REPLY 1
PGStats
Opal | Level 21

Add the statement

ODS output ParameterEstimates=myEstimates;

to your proc reg code. The dataset myEstimates will be created with all the parameter estimates table info for every year. Look for the section ODS table names in the Details section of proc reg documentation. Every table seen in the output window can be written to a dataset this way.

PG

PG

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 642 views
  • 0 likes
  • 2 in conversation