Suppose I have a dataset containing 0/1 dummy variables x1, x2, . . . , xk and I'd like to find the mean values (i.e., probabilities) of all possible combinations of the main terms and interactions.
We won't assume the variables are independent and therefore can't simply multiply the mean values of main terms to find mean values of interactions
I was hoping the following would work but alas it doesn't:
proc means data=test;
var x1|x2|x3@3;
run;
Also tried the lsmeans statement in proc reg or proc glm but it only finds the means of the dependent variable conditional on x1|x2|x3.
Is there a handy procedure, statement or option that will do this for me? I'll keep hunting through the SAS documentation.
PROC GLMMOD will create an output data set containing all main effects and interactions. Then you can run that output through PROC MEANS.
PROC GLMMOD will create an output data set containing all main effects and interactions. Then you can run that output through PROC MEANS.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.