<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SAS code or procedure that finds means of all main effect and interactions for dummy variables? in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-code-or-procedure-that-finds-means-of-all-main-effect-and/m-p/787937#M40056</link>
    <description>&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was hoping the following would work but alas it doesn't:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=test;
var x1|x2|x3@3;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also tried the lsmeans statement in proc reg or proc glm but it only finds the means of the dependent variable conditional on &lt;FONT face="Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace" color="#000000"&gt;&lt;SPAN style="font-size: 14.4px; white-space: pre; background-color: #f5f2f0;"&gt;x1|x2|x3.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a handy procedure, statement or option that will do this for me? I'll keep hunting through the SAS documentation.&lt;/P&gt;</description>
    <pubDate>Fri, 31 Dec 2021 17:54:31 GMT</pubDate>
    <dc:creator>RobertWF1</dc:creator>
    <dc:date>2021-12-31T17:54:31Z</dc:date>
    <item>
      <title>SAS code or procedure that finds means of all main effect and interactions for dummy variables?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-code-or-procedure-that-finds-means-of-all-main-effect-and/m-p/787937#M40056</link>
      <description>&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was hoping the following would work but alas it doesn't:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=test;
var x1|x2|x3@3;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also tried the lsmeans statement in proc reg or proc glm but it only finds the means of the dependent variable conditional on &lt;FONT face="Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace" color="#000000"&gt;&lt;SPAN style="font-size: 14.4px; white-space: pre; background-color: #f5f2f0;"&gt;x1|x2|x3.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a handy procedure, statement or option that will do this for me? I'll keep hunting through the SAS documentation.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Dec 2021 17:54:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-code-or-procedure-that-finds-means-of-all-main-effect-and/m-p/787937#M40056</guid>
      <dc:creator>RobertWF1</dc:creator>
      <dc:date>2021-12-31T17:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code or procedure that finds means of all main effect and interactions for dummy variables?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-code-or-procedure-that-finds-means-of-all-main-effect-and/m-p/787951#M40058</link>
      <description>&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/statug/statug_glmmod_toc.htm" target="_self"&gt;PROC GLMMOD&lt;/A&gt; will create an output data set containing all main effects and interactions. Then you can run that output through PROC MEANS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Dec 2021 18:45:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-code-or-procedure-that-finds-means-of-all-main-effect-and/m-p/787951#M40058</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-12-31T18:45:08Z</dc:date>
    </item>
  </channel>
</rss>

