<?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: Quadrant scatterplot using SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Quadrant-scatterplot-using-SAS/m-p/858166#M339068</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/379997"&gt;@kevsma&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello, I came across this&amp;nbsp;&lt;A href="https://blogs.sas.com/content/sgf/2017/02/24/18-visualizations-created-by-sas-visual-analytics/visualizations-created-by-sas-visual-analytics-chart-17/" target="_self"&gt;scatterplot&lt;/A&gt;&amp;nbsp;when trying to figure out ways to draw a quadrant scatterplot. This link depicts exactly what I need. Does anyone know how to code it? Many thanks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Feb 2023 00:05:49 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-02-10T00:05:49Z</dc:date>
    <item>
      <title>Quadrant scatterplot using SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Quadrant-scatterplot-using-SAS/m-p/858164#M339066</link>
      <description>&lt;P&gt;Hello, I came across this&amp;nbsp;&lt;A href="https://blogs.sas.com/content/sgf/2017/02/24/18-visualizations-created-by-sas-visual-analytics/visualizations-created-by-sas-visual-analytics-chart-17/" target="_self"&gt;scatterplot&lt;/A&gt;&amp;nbsp;when trying to figure out ways to draw a quadrant scatterplot. This link depicts exactly what I need. Does anyone know how to code it? Many thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 00:03:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Quadrant-scatterplot-using-SAS/m-p/858164#M339066</guid>
      <dc:creator>kevsma</dc:creator>
      <dc:date>2023-02-10T00:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Quadrant scatterplot using SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Quadrant-scatterplot-using-SAS/m-p/858166#M339068</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/379997"&gt;@kevsma&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello, I came across this&amp;nbsp;&lt;A href="https://blogs.sas.com/content/sgf/2017/02/24/18-visualizations-created-by-sas-visual-analytics/visualizations-created-by-sas-visual-analytics-chart-17/" target="_self"&gt;scatterplot&lt;/A&gt;&amp;nbsp;when trying to figure out ways to draw a quadrant scatterplot. This link depicts exactly what I need. Does anyone know how to code it? Many thanks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 00:05:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Quadrant-scatterplot-using-SAS/m-p/858166#M339068</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-02-10T00:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Quadrant scatterplot using SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Quadrant-scatterplot-using-SAS/m-p/858167#M339069</link>
      <description>&lt;P&gt;With some snark out of the way where the question might have been better phrased "How to code".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The graph is a BUBBLE plot with data labels, with two vertical and one horizontal REFLINE. YAXIS and XAXIS statements control the appearance of the axis. Proc Sgplot should handle that just fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Provide some example data and we can help walk you through it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 00:10:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Quadrant-scatterplot-using-SAS/m-p/858167#M339069</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-02-10T00:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Quadrant scatterplot using SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Quadrant-scatterplot-using-SAS/m-p/858174#M339074</link>
      <description>&lt;P&gt;That'd be great, thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;!!&lt;/P&gt;
&lt;P&gt;Below&amp;nbsp; is a snippet of the sample dataset I am dealing with:&lt;/P&gt;
&lt;P&gt;uci: unique identifier of the data&lt;/P&gt;
&lt;P&gt;eth2: hispanic or white&lt;/P&gt;
&lt;P&gt;svscd: type of services each UCI is receiving, categorical&lt;/P&gt;
&lt;P&gt;claim: total spending&lt;/P&gt;
&lt;P&gt;rank_caseload and rank_avg are the two ranking variables based on caseload and svsavgclaim&lt;/P&gt;
&lt;P&gt;cat: 4 categories I created.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kevsma_0-1675990683259.png" style="width: 492px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80293iB29A77698B315FE2/image-dimensions/492x180?v=v2" width="492" height="180" role="button" title="kevsma_0-1675990683259.png" alt="kevsma_0-1675990683259.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I want to draw a bubble plot with four quadrant sections (identified by the "cat" column where 4 categories are included: high-frequency, low-cost; high-frequency, high-cost; low-frequency, low-cost; and low-frequency, high-cost). I want the x-axis to be caseload values and the y-axis to be claim values or vice versa. I'd want the two ethnicities: Hispanic and White to be represented using different colors. Ideally each dot would represent an ID, so that I can see how dots are clustering around what section for the two ethnicity groups. Hope that makes sense.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 01:01:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Quadrant-scatterplot-using-SAS/m-p/858174#M339074</guid>
      <dc:creator>kevsma</dc:creator>
      <dc:date>2023-02-10T01:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Quadrant scatterplot using SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Quadrant-scatterplot-using-SAS/m-p/858298#M339118</link>
      <description>&lt;P&gt;Can't program against pictures.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should provide a NUMERIC value for the boundary between high frequency (and I have to assume LOW FREQUENCY as your picture doesn't show any values of that) and between Low Cost and High Cost. Those numbers would used for REFLINE statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your description is more of SCATTER plot if you want one point for each ID. A BUBBLE plot includes a third variable that indicates the size of the Bubble to so individual points are differentiated by a third measure such as maybe your average claim.&lt;/P&gt;
&lt;P&gt;Which variable is your ID? When you discuss specifics you want to make sure to use the variable names as we do not know your data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See if this gets you started: The refline values should match the rule you used to assign high/low, but based on the value of the caseload or claim values.&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=have;
   scatter x=caseload y=claim /group=eth2
       datalabel=&amp;lt;name of your id variable&amp;gt;
   ;
   refline &amp;lt;boundary value between low/high claim&amp;gt;
           /axis=Y;
   refline &amp;lt;boundary value between low/high caseload&amp;gt;
           /axis=X;
run;&lt;/PRE&gt;
&lt;P&gt;To place TEXT of your quadrant label you will need to provide EXACTLY 4 records with the claim/caseload values that represent where the TEXT should appear and the text value, not one of the points to plot.Likely a different variable than your current CAT as you have that on every record. The idea is to have a single x y pair with one piece of text to display.&lt;/P&gt;
&lt;P&gt;Then a TEXT statement with the x and y variables and TEXT=cat&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One way to convert data set to data step is 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>Fri, 10 Feb 2023 16:33:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Quadrant-scatterplot-using-SAS/m-p/858298#M339118</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-02-10T16:33:59Z</dc:date>
    </item>
  </channel>
</rss>

