BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
JKCho
Pyrite | Level 9
proc surveyreg data=master;
 class fAUDITOR_FKEY MSA sic fyear;
 model audfee = fAUDITOR_FKEY others/ solution;
output out=model r=residual;
run;
quit;

fAUDITOR_FKEY is a set of categorical variables. There are more than 100 different auditors in my observations and I want to obtain each coefficient for each auditor. Of course, I can obtain them in the result, but I want to have them as I have residuals by the "r=residual" code. Does SAS have a code for doing that? I looked for that, and it seems SAS has, but I did not find the right one...

 

I appreciate your help!

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

I believe this works ... however, I cannot test it, so that is your job

 

proc surveyreg data=master;
ods output ParameterEstimates=coefficients;
 class fAUDITOR_FKEY MSA sic fyear;
 model audfee = fAUDITOR_FKEY others/ solution;
output out=model r=residual;
run;
quit;
--
Paige Miller

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

I believe this works ... however, I cannot test it, so that is your job

 

proc surveyreg data=master;
ods output ParameterEstimates=coefficients;
 class fAUDITOR_FKEY MSA sic fyear;
 model audfee = fAUDITOR_FKEY others/ solution;
output out=model r=residual;
run;
quit;
--
Paige Miller
JKCho
Pyrite | Level 9

This works definitely. 

I wanted to have coefficients matched with observations, but I can do that part. 

 

Thank you 🙂

PaigeMiller
Diamond | Level 26

@JKCho wrote:

 

I wanted to have coefficients matched with observations, but I can do that part. 


Are you implying that you want to use the coefficients to generate predicted values by saying "coefficients matched with observation"? PROC SURVEYREG will compute predicted values for you.

--
Paige Miller

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
  • 3 replies
  • 1268 views
  • 0 likes
  • 2 in conversation