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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 275 views
  • 1 like
  • 2 in conversation