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.
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!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.