<?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 PROC ANOVA, box plot is not in correct order in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-ANOVA-box-plot-is-not-in-correct-order/m-p/335061#M75754</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran a PROC ANOVA and my box plot is coming out with the three age groups I used in the analysis, but the age group that should be "first" which includes the youngest patients is in the middle instead of on the far left. So the plots are 3-6 months, &lt;span class="lia-unicode-emoji" title=":red_heart:"&gt;❤️&lt;/span&gt; months, and &amp;gt;6 months. Is there a way to switch the &lt;span class="lia-unicode-emoji" title=":red_heart:"&gt;❤️&lt;/span&gt; months and 3-6 months so looking at the plots you are looking at them by age increasing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, if this helps, the age groups are formatted into the 3 groups,&amp;nbsp;and there is only one age variable in the data set.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know it might be difficult to determine since I am not giving screenshots but I dont have SAS on my laptop, sorry!&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 22 Feb 2017 18:30:39 GMT</pubDate>
    <dc:creator>edomachowske</dc:creator>
    <dc:date>2017-02-22T18:30:39Z</dc:date>
    <item>
      <title>PROC ANOVA, box plot is not in correct order</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-ANOVA-box-plot-is-not-in-correct-order/m-p/335061#M75754</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran a PROC ANOVA and my box plot is coming out with the three age groups I used in the analysis, but the age group that should be "first" which includes the youngest patients is in the middle instead of on the far left. So the plots are 3-6 months, &lt;span class="lia-unicode-emoji" title=":red_heart:"&gt;❤️&lt;/span&gt; months, and &amp;gt;6 months. Is there a way to switch the &lt;span class="lia-unicode-emoji" title=":red_heart:"&gt;❤️&lt;/span&gt; months and 3-6 months so looking at the plots you are looking at them by age increasing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, if this helps, the age groups are formatted into the 3 groups,&amp;nbsp;and there is only one age variable in the data set.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know it might be difficult to determine since I am not giving screenshots but I dont have SAS on my laptop, sorry!&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 18:30:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-ANOVA-box-plot-is-not-in-correct-order/m-p/335061#M75754</guid>
      <dc:creator>edomachowske</dc:creator>
      <dc:date>2017-02-22T18:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: PROC ANOVA, box plot is not in correct order</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-ANOVA-box-plot-is-not-in-correct-order/m-p/335065#M75757</link>
      <description>&lt;P&gt;My guess is you have a character variables as your class variable. Use a numeric variable and then apply a format to have it show the description you'd like.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The default for ORDER appears to be FORMATTED, when INTERNAL is probably what you were expecting. You may just need the ORDER depending on what your data/code looked like, which we have no idea.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
    set sashelp.class;

    if age &amp;lt; 12 then
        age_group=1;
    else if age &amp;lt; 15 then
        age_group=2;
    else if age &amp;gt;=16 then
        age_group=3;
    label age_group='Age Group';
run;

proc format ;
    value age_fmt 1='Pre-Teen' 2='Teen' 3='Driver';
run;

proc anova data=class order=internal;
    class age_group;
    model weight=age_group;
    format age_group age_fmt.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 18:38:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-ANOVA-box-plot-is-not-in-correct-order/m-p/335065#M75757</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-02-22T18:38:20Z</dc:date>
    </item>
  </channel>
</rss>

