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 🙂
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,
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,
Adding to the already correct solution ... you may want
output out=want predicted=predicted_varname residual=residual_varname;
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!
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.