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!
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;
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;
This works definitely.
I wanted to have coefficients matched with observations, but I can do that part.
Thank you 🙂
@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.
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!
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.