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

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

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
  • 1 reply
  • 297 views
  • 1 like
  • 2 in conversation