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

Hello !

I have a table with multiple categorical variables in input and a continuous variable in output. I ran a Proc glm on this table, which gives me coefficients for all the modalities. Now i'm trying to "apply" all those coefficients to my real observations and add a column "regression output" to my table that gives me the "predicted" output for every observation. So I can compare the real output and the predicted one. 

 

Thank you for your help 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
ed_sas_member
Meteorite | Level 14

Hi @Mathis1 

 

You can add the predicted option to the output statement:

proc glm data=have;
   class x1 x2 ...;
model y = x1 x2 ... / solution; output out=want predicted=predicted_varname; run;

Best,

View solution in original post

2 REPLIES 2
ed_sas_member
Meteorite | Level 14

Hi @Mathis1 

 

You can add the predicted option to the output statement:

proc glm data=have;
   class x1 x2 ...;
model y = x1 x2 ... / solution; output out=want predicted=predicted_varname; run;

Best,

PaigeMiller
Diamond | Level 26

Adding to the already correct solution ... you may want

 

output out=want predicted=predicted_varname residual=residual_varname;
--
Paige Miller

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 845 views
  • 0 likes
  • 3 in conversation