<?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: Unexpected Results with PROC BOXPLOT in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Unexpected-Results-with-PROC-BOXPLOT/m-p/361229#M64474</link>
    <description>&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that the picture of your output really isn't possible with the code you've shown. As a minimum there may be a Title statment missing.&lt;/P&gt;
&lt;P&gt;But with your "title" showing "FUEL=Diesel" and all of the horizontal axis values of "gasolina" I suspect there is something else you haven't shown.&lt;/P&gt;</description>
    <pubDate>Wed, 24 May 2017 14:41:27 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-05-24T14:41:27Z</dc:date>
    <item>
      <title>Unexpected Results with PROC BOXPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Unexpected-Results-with-PROC-BOXPLOT/m-p/360932#M64448</link>
      <description>&lt;P&gt;I would like to create a boxplot to compare the distributions between two values of a categorical variable. I would like to use PROC BOXPLOT to take advantage of the INSETGROUP statement and display univariate statistics for each value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code I'm using is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC BOXPLOT DATA=&amp;amp;dsn;&lt;/P&gt;&lt;P&gt;BY &amp;amp;age_bucket;&lt;/P&gt;&lt;P&gt;PLOT mileage*fuel / MAXPANELS=100;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the MAXPANELS= option because I initially got an error stating the number of panels needed is 97 and I can alter the default with the MAXPANELS= option. However, even after adding it, I get unexpected results. The categorical variable&amp;nbsp;&lt;EM&gt;fuel&lt;/EM&gt; only has two values, so I'm expected to boxplots on one panel with this code (for each&amp;nbsp;&lt;EM&gt;age_bucket&lt;/EM&gt;).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone explain why this is not happening and I'm getting instead dozens of boxplots across repeated values of the categorical variable&amp;nbsp;&lt;EM&gt;fuel&lt;/EM&gt;?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any assistance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dhrumil&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 21:19:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Unexpected-Results-with-PROC-BOXPLOT/m-p/360932#M64448</guid>
      <dc:creator>dhrumil_patel</dc:creator>
      <dc:date>2017-05-23T21:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected Results with PROC BOXPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Unexpected-Results-with-PROC-BOXPLOT/m-p/360940#M64449</link>
      <description>&lt;P&gt;Show some example data.&lt;/P&gt;
&lt;P&gt;And some of the output.&lt;/P&gt;
&lt;P&gt;And what does the macro variable &amp;amp;age_bucket resolve to? I would normally expect a single variable that has values of age or the age group and do not see why a macro variable was needed. Unless your "age_bucket" is consisting fo multiple variables in which case that will go a long way to explaining many plots.&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 21:52:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Unexpected-Results-with-PROC-BOXPLOT/m-p/360940#M64449</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-05-23T21:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected Results with PROC BOXPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Unexpected-Results-with-PROC-BOXPLOT/m-p/360959#M64450</link>
      <description>&lt;P&gt;Yes. Thanks for the clarification.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example data and output are attached.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, I misstated in that age_bucket is not a macro variable, just a variable:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc boxplot data=&amp;amp;dsn;&lt;BR /&gt;by age_bucket;&lt;BR /&gt;plot kms*fuel_vims / maxpanels=100;&lt;BR /&gt;run;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13869i6190C2AB46888F31/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="example_output.PNG" title="example_output.PNG" /&gt;</description>
      <pubDate>Tue, 23 May 2017 23:15:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Unexpected-Results-with-PROC-BOXPLOT/m-p/360959#M64450</guid>
      <dc:creator>dhrumil_patel</dc:creator>
      <dc:date>2017-05-23T23:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected Results with PROC BOXPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Unexpected-Results-with-PROC-BOXPLOT/m-p/360960#M64451</link>
      <description>&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13870iC4115905397874F4/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="example_data.PNG" title="example_data.PNG" /&gt;</description>
      <pubDate>Tue, 23 May 2017 23:15:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Unexpected-Results-with-PROC-BOXPLOT/m-p/360960#M64451</guid>
      <dc:creator>dhrumil_patel</dc:creator>
      <dc:date>2017-05-23T23:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected Results with PROC BOXPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Unexpected-Results-with-PROC-BOXPLOT/m-p/360974#M64453</link>
      <description>&lt;P&gt;Run a proc freq on your FUEL variable with NO formats. I suspect you have an underlying format that may be causing the issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=have;
table fuel;
format fuel;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 May 2017 00:13:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Unexpected-Results-with-PROC-BOXPLOT/m-p/360974#M64453</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-05-24T00:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected Results with PROC BOXPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Unexpected-Results-with-PROC-BOXPLOT/m-p/361229#M64474</link>
      <description>&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that the picture of your output really isn't possible with the code you've shown. As a minimum there may be a Title statment missing.&lt;/P&gt;
&lt;P&gt;But with your "title" showing "FUEL=Diesel" and all of the horizontal axis values of "gasolina" I suspect there is something else you haven't shown.&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 14:41:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Unexpected-Results-with-PROC-BOXPLOT/m-p/361229#M64474</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-05-24T14:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected Results with PROC BOXPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Unexpected-Results-with-PROC-BOXPLOT/m-p/544865#M74265</link>
      <description>&lt;P&gt;I ran in the same issue. You have to sort the data first.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 14:18:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Unexpected-Results-with-PROC-BOXPLOT/m-p/544865#M74265</guid>
      <dc:creator>ap15</dc:creator>
      <dc:date>2019-03-21T14:18:14Z</dc:date>
    </item>
  </channel>
</rss>

