proc glm data=work.data_1;
class z;
model y=w z;
run;
Appreciate if anyone could let me know how to add to the plot horizontal lines correspondent means for y in each group z.
I don't think such a facility is available in GLM. I think you have to pre calculate the mean values for each group and use the REFLINE Statement in PROC SGPLOT.
Save it as a dataset by :
ods output ANCOVAPlot=want;
proc glm data=sashelp.class;
class sex;
model weight =sex height;
quit;
and plot refline via PROC SGPLOT .
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!
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.
Ready to level-up your skills? Choose your own adventure.