BookmarkSubscribeRSS Feed
superclj123
Calcite | Level 5

Dear all

I run a regression with both years fixed effect and cluster standard error by firms, the result is below. I found the year fixed effect is so strange, why there are only two years. My data period is from 1990 to 2019. Can someone tell me what's wrong? I wrote down the code here.

 

proc surveyreg data=tmp1.dataset; class year;
cluster permno;
model future_accuracy = rw3_std varx vary varx*vary L_abnret AbnRet firm_age size lev BTM rw10_std busseg sdret earn year / solution;
run;quit;

 

superclj123_0-1631506603759.png

Also the degree of freedom here is strange, I have 20000 observations in my dataset but the degree of freedom here is only about 1000?

 

Anyone can help? Thanks in advance

 

1 REPLY 1
ballardw
Super User

Post the LOG from running the code.

That will indicate how many records are used.

It may be that only those two years you've shown have non-missing values for ALL of the variables on your model statement. By default any missing value for a variable on a model statement will result result in the record being excluded from the analysis. Which likely impact the degrees of freedom as well.

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
  • 611 views
  • 0 likes
  • 2 in conversation