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

Hello experts, I appreciate any comment on this.

Ramin1_0-1634837096658.png

I want to get the residual for each of the companies in my sample by using the above regression model.  I am using the following code;

 

Proc surveyreg Data = want;

cluster gvkey; *standard error clustered by firm;

class industry year;

model I_new=V_P Lev Cash Age Size StR I_new_pre industry year/solution;

*lsmeans industry year;

run;

 

How I can get the residual for each of the companies? If I include gvkey in class statement, I get standard errors for all companies but I am not sure about it and in that case, I can't use the cluster statement as it shows no memory.

Ramin1_1-1634837686588.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

You ask for residuals in PROC SURVEYREG by using the OUTPUT statement.

--
Paige Miller

View solution in original post

1 REPLY 1
PaigeMiller
Diamond | Level 26

You ask for residuals in PROC SURVEYREG by using the OUTPUT statement.

--
Paige Miller

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
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
  • 1027 views
  • 1 like
  • 2 in conversation