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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 3 replies
  • 586 views
  • 0 likes
  • 2 in conversation