<?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: Query on how to get exact output on a proc sgplot in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647648#M193854</link>
    <description>Thank you i got the output what i need.</description>
    <pubDate>Wed, 13 May 2020 22:49:49 GMT</pubDate>
    <dc:creator>Amali6</dc:creator>
    <dc:date>2020-05-13T22:49:49Z</dc:date>
    <item>
      <title>Query on how to get exact output on a proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647574#M193824</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Amali6_0-1589394354906.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39384i49C33D2FFA3FFF4D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Amali6_0-1589394354906.png" alt="Amali6_0-1589394354906.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am working on hotel dataset and i want to find the price of both hotels charging for different customer_type. Here adr is&amp;nbsp;&lt;SPAN&gt;Average Daily Rate as defined by dividing the sum of all lodging transactions by the total number of staying nights. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hotel variable has 2 hotels which are city and resort hotel. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Customer_type= Transient,contract ,group.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have used this code:&lt;/P&gt;&lt;P&gt;proc sgplot data=hotel.Hotel_bookings;&lt;BR /&gt;scatter x=customer_type y=adr/ group=hotel;&lt;/P&gt;&lt;P&gt;&amp;nbsp;title'Does the hotel charges varied for different customer';&lt;BR /&gt;&amp;nbsp;run;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The above output i got, but there the adr variable should be increasing by 100 starting from 0. Also the plotting is not clear.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help how to correct this please..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 18:38:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647574#M193824</guid>
      <dc:creator>Amali6</dc:creator>
      <dc:date>2020-05-13T18:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Query on how to get exact output on a proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647588#M193830</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;The above output i got, but there the adr variable should be increasing by 100 starting from 0. Also the plotting is not clear.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone help how to correct this please..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Why should anything go from 100 to 0? Your data has to provide the X and Y values. If you don't have a 100 then you need to do something. The Y axis showing values to 6000 makes me suspect something wonky in your ADR calculation&lt;/P&gt;
&lt;P&gt;If you want to see a distribution of values I would suggest a BOXPLOT instead of scatter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data is important when plotting something. 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 &amp;lt;&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 19:08:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647588#M193830</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-05-13T19:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Query on how to get exact output on a proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647592#M193831</link>
      <description>&lt;P&gt;Yes i agree with you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;,&amp;nbsp;boxplot would be better suitable .The reason i need adr in 100's is since it is hotel in europe the charge per day i want to show in 100's series.&amp;nbsp;&lt;/P&gt;&lt;P&gt;While switching to boxplot, can you help how to change the adr variable in 100's rate please??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 19:45:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647592#M193831</guid>
      <dc:creator>Amali6</dc:creator>
      <dc:date>2020-05-13T19:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Query on how to get exact output on a proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647613#M193839</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/328574"&gt;@Amali6&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Yes i agree with you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;,&amp;nbsp;boxplot would be better suitable .The reason i need adr in 100's is since it is hotel in europe the charge per day i want to show in 100's series.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While switching to boxplot, can you help how to change the adr variable in 100's rate please??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You will need to provide some data, preferably the before your current calculation of ADR.&lt;/P&gt;
&lt;P&gt;Then show the code you currently used to create ADR.&lt;/P&gt;
&lt;P&gt;Then provide the rules of what value would be "100". That sounds like there may be a "standardizing" involved but just saying 0 to 100 doesn't describe what is going on. If you want to place the percentile of a value as part of a group of values then say so.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One thing that brings a minor concern to the brief description of ADR you used is that longer stays might be biasing your data. I know that I see TV advertisements for hotel chains like "stay 4 nights and the 5th night is free". Or loyalty programs that will adjust prices based on number of stays in a period.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For many purposes I would look at the distribution with box plots before worrying about any shifting of values because that shows me more about the raw data without having to go into any odd algebra to discuss comparing values.&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 20:30:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647613#M193839</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-05-13T20:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: Query on how to get exact output on a proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647618#M193841</link>
      <description>&lt;P&gt;You have a significant outlier. If you remove your outlier your graphs will likely be better formatted by default.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can control the axis using Xaxis or yAxis statement to control the values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;yaxis values = (0 to 1000 by 100);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 May 2020 20:46:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647618#M193841</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-05-13T20:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Query on how to get exact output on a proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647637#M193849</link>
      <description>&lt;P&gt;Start with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title'Do hotel charges vary for different customer types';
proc sgplot data=hotel.Hotel_bookings;
where adr &amp;lt; 1000;
vbox adr / category=customer group=hotel;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 May 2020 21:48:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647637#M193849</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-05-13T21:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Query on how to get exact output on a proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647648#M193854</link>
      <description>Thank you i got the output what i need.</description>
      <pubDate>Wed, 13 May 2020 22:49:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647648#M193854</guid>
      <dc:creator>Amali6</dc:creator>
      <dc:date>2020-05-13T22:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Query on how to get exact output on a proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647651#M193855</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/328574"&gt;@Amali6&lt;/a&gt; ,&amp;nbsp; Great! Please post the resulting graph for the benefit of members consulting this thread in the future.&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 23:22:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647651#M193855</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-05-13T23:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Query on how to get exact output on a proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647656#M193857</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Amali6_0-1589415626450.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39397iEAD5BA3ED17F0E13/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Amali6_0-1589415626450.png" alt="Amali6_0-1589415626450.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2020 00:21:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Query-on-how-to-get-exact-output-on-a-proc-sgplot/m-p/647656#M193857</guid>
      <dc:creator>Amali6</dc:creator>
      <dc:date>2020-05-14T00:21:03Z</dc:date>
    </item>
  </channel>
</rss>

