<?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 Re: ANOVA in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ANOVA/m-p/706152#M216708</link>
    <description>&lt;P&gt;Please read the log from this code and see if there are ERROR or WARNING or NOTE that explains this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that doesn't get you the answer, then please add&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mprint;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;as the first line of your program, run the whole thing, and then you look at the log, with the extra information and see if an ERROR or WARNING or NOTE indicates what the problem is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a last resort, if none of the above seems to indicate the problem, show us the log by performing the following steps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Copy the log as text. We need the entire log for this section of code, with nothing chopped out&lt;/LI&gt;
&lt;LI&gt;Include the log into your reply by clicking on the &amp;lt;/&amp;gt; icon and then pasting the log into this window. &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;DO NOT SKIP THIS STEP.&lt;/STRONG&gt; &lt;FONT color="#333333"&gt;This preserves the formatting and makes the log much more readable. I no longer even try to read logs posted that don't follow this step.&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Tue, 15 Dec 2020 22:59:44 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-12-15T22:59:44Z</dc:date>
    <item>
      <title>ANOVA</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANOVA/m-p/706146#M216707</link>
      <description>&lt;P&gt;Hi everyone I have a specific question regarding my anova I have created. I have to create 4 anova results, and when I run my code it creates anovaresults2, anovaresults3 and anovaresults4, I do not know why my anovaresults 1 does not show up as I have set each anova up the same way. My code is below please let me know what you think is going wrong, THANK YOU!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;ODS OUTPUT ModelANOVA = WORK.ModelResults1;&lt;/DIV&gt;&lt;DIV&gt;PROC ANOVA&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;DATA = MIInq.MIIInquiry2;&lt;/DIV&gt;&lt;DIV&gt;CLASS StateCd;&lt;/DIV&gt;&lt;DIV&gt;Model AgeAtVisit = StateCd;&lt;/DIV&gt;&lt;DIV&gt;RUN;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;%MACRO RunANOVA (Number = , Variable = );&lt;/DIV&gt;&lt;DIV&gt;ODS OUTPUT ModelANOVA = MIOut.ANOVAResults&amp;amp;Number;&lt;/DIV&gt;&lt;DIV&gt;PROC ANOVA&lt;/DIV&gt;&lt;DIV&gt;DATA = MIInq.MIInquiry2;&lt;/DIV&gt;&lt;DIV&gt;CLASS StateCd;&lt;/DIV&gt;&lt;DIV&gt;MODEL &amp;amp;Variable = StateCd;&lt;/DIV&gt;&lt;DIV&gt;RUN;&lt;/DIV&gt;&lt;DIV&gt;QUIT;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;PROC PRINT DATA = MIOut.ANOVAResults&amp;amp;Number;&lt;/DIV&gt;&lt;DIV&gt;RUN;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;%MEND RunANOVA;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;%RunANOVA (Number = 1, Variable = AgeAtVisit)&lt;/DIV&gt;&lt;DIV&gt;%RunANOVA (Number = 2, Variable = SBP)&lt;/DIV&gt;&lt;DIV&gt;%RunANOVA (Number = 3, Variable = DBP)&lt;/DIV&gt;&lt;DIV&gt;%RunANOVA (Number = 4, Variable = WtLb);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;PROC MEANS DATA = MIInq.MIInquiry2;&lt;/DIV&gt;&lt;DIV&gt;CLASS StateCd;&lt;/DIV&gt;&lt;DIV&gt;VAR WtLb;&lt;/DIV&gt;&lt;DIV&gt;RUN;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;DATA MIOut.ANOVAResults (KEEP = Dependent FValue ProbF);&lt;/DIV&gt;&lt;DIV&gt;SET WORK.ANOVAResults: ;&lt;/DIV&gt;&lt;DIV&gt;RUN;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 22:38:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANOVA/m-p/706146#M216707</guid>
      <dc:creator>Rohan_Garg4</dc:creator>
      <dc:date>2020-12-15T22:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: ANOVA</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANOVA/m-p/706152#M216708</link>
      <description>&lt;P&gt;Please read the log from this code and see if there are ERROR or WARNING or NOTE that explains this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that doesn't get you the answer, then please add&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mprint;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;as the first line of your program, run the whole thing, and then you look at the log, with the extra information and see if an ERROR or WARNING or NOTE indicates what the problem is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a last resort, if none of the above seems to indicate the problem, show us the log by performing the following steps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Copy the log as text. We need the entire log for this section of code, with nothing chopped out&lt;/LI&gt;
&lt;LI&gt;Include the log into your reply by clicking on the &amp;lt;/&amp;gt; icon and then pasting the log into this window. &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;DO NOT SKIP THIS STEP.&lt;/STRONG&gt; &lt;FONT color="#333333"&gt;This preserves the formatting and makes the log much more readable. I no longer even try to read logs posted that don't follow this step.&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 15 Dec 2020 22:59:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANOVA/m-p/706152#M216708</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-15T22:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: ANOVA</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANOVA/m-p/706164#M216711</link>
      <description>&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_ods_examples06.htm&amp;amp;docsetVersion=15.2&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_ods_examples06.htm&amp;amp;docsetVersion=15.2&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a matter of general principles, always put the ODS OUTPUT statements after the PROC statements.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 23:43:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANOVA/m-p/706164#M216711</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2020-12-15T23:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: ANOVA</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANOVA/m-p/706173#M216714</link>
      <description>&lt;P&gt;FYI - if you search on here you'll find a method I suggested that accomplishes everything you're trying to do WITHOUT macros and significantly less code. One of your classmates already asked this question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As to why it's not running, as others have indicated you'll need to provide the log - it usually has the errors and reasons why. If it works for one set of variables and not another it's likely something specific with that piece of code or variable, that we can't answer without the data. You can also try it with a known data set that's similar such as sashelp.heart.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/350130"&gt;@Rohan_Garg4&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi everyone I have a specific question regarding my anova I have created. I have to create 4 anova results, and when I run my code it creates anovaresults2, anovaresults3 and anovaresults4, I do not know why my anovaresults 1 does not show up as I have set each anova up the same way. My code is below please let me know what you think is going wrong, THANK YOU!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;ODS OUTPUT ModelANOVA = WORK.ModelResults1;&lt;/DIV&gt;
&lt;DIV&gt;PROC ANOVA&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;DATA = MIInq.MIIInquiry2;&lt;/DIV&gt;
&lt;DIV&gt;CLASS StateCd;&lt;/DIV&gt;
&lt;DIV&gt;Model AgeAtVisit = StateCd;&lt;/DIV&gt;
&lt;DIV&gt;RUN;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;%MACRO RunANOVA (Number = , Variable = );&lt;/DIV&gt;
&lt;DIV&gt;ODS OUTPUT ModelANOVA = MIOut.ANOVAResults&amp;amp;Number;&lt;/DIV&gt;
&lt;DIV&gt;PROC ANOVA&lt;/DIV&gt;
&lt;DIV&gt;DATA = MIInq.MIInquiry2;&lt;/DIV&gt;
&lt;DIV&gt;CLASS StateCd;&lt;/DIV&gt;
&lt;DIV&gt;MODEL &amp;amp;Variable = StateCd;&lt;/DIV&gt;
&lt;DIV&gt;RUN;&lt;/DIV&gt;
&lt;DIV&gt;QUIT;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;PROC PRINT DATA = MIOut.ANOVAResults&amp;amp;Number;&lt;/DIV&gt;
&lt;DIV&gt;RUN;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;%MEND RunANOVA;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;%RunANOVA (Number = 1, Variable = AgeAtVisit)&lt;/DIV&gt;
&lt;DIV&gt;%RunANOVA (Number = 2, Variable = SBP)&lt;/DIV&gt;
&lt;DIV&gt;%RunANOVA (Number = 3, Variable = DBP)&lt;/DIV&gt;
&lt;DIV&gt;%RunANOVA (Number = 4, Variable = WtLb);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;PROC MEANS DATA = MIInq.MIInquiry2;&lt;/DIV&gt;
&lt;DIV&gt;CLASS StateCd;&lt;/DIV&gt;
&lt;DIV&gt;VAR WtLb;&lt;/DIV&gt;
&lt;DIV&gt;RUN;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;DATA MIOut.ANOVAResults (KEEP = Dependent FValue ProbF);&lt;/DIV&gt;
&lt;DIV&gt;SET WORK.ANOVAResults: ;&lt;/DIV&gt;
&lt;DIV&gt;RUN;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 00:34:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANOVA/m-p/706173#M216714</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-12-16T00:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: ANOVA</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ANOVA/m-p/706186#M216720</link>
      <description>&lt;P&gt;Yep, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; is correct, you don't need macros here at all, which probably simplifies the code greatly. &lt;A href="https://communities.sas.com/t5/SAS-Programming/Using-Macro-Variables-With-Proc-Anova/m-p/703459#M215546" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Using-Macro-Variables-With-Proc-Anova/m-p/703459#M215546&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 01:24:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ANOVA/m-p/706186#M216720</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-16T01:24:49Z</dc:date>
    </item>
  </channel>
</rss>

