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

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.

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

PROC GLMMOD will create an output data set containing all main effects and interactions. Then you can run that output through PROC MEANS.

 

 

--
Paige Miller

View solution in original post

1 REPLY 1
PaigeMiller
Diamond | Level 26

PROC GLMMOD will create an output data set containing all main effects and interactions. Then you can run that output through PROC MEANS.

 

 

--
Paige Miller

SAS Innovate 2025: Call for Content

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!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 361 views
  • 1 like
  • 2 in conversation