<?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: Sas gmap in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Sas-gmap/m-p/805722#M39626</link>
    <description>&lt;P&gt;Yes, US_STATES is a map data set, it contains the co-ordinates of the boundaries of the different states so that a map can be drawn. It doesn't contain SEX.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You provide a "legend" showing a variable named SEX, what data set is that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, no need for PROC SORT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Apr 2022 15:17:22 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-04-04T15:17:22Z</dc:date>
    <item>
      <title>Sas gmap</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Sas-gmap/m-p/805697#M39623</link>
      <description>&lt;P&gt;I am trying to sort my data from a dataset in order to make a gmap and was asked the following:&lt;/P&gt;
&lt;OL&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Choose &lt;/SPAN&gt;&lt;STRONG&gt;one cause &lt;/STRONG&gt;&lt;SPAN&gt;(high blood pressure, obstructive heart disease, or stroke) and &lt;/SPAN&gt;&lt;STRONG&gt;one level of sex &lt;/STRONG&gt;&lt;SPAN&gt;(all, female, or male) and subset your data to only those levels.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="1"&gt;&lt;SPAN&gt;Use the “&lt;/SPAN&gt;&lt;SPAN&gt;levels&lt;/SPAN&gt;&lt;SPAN&gt;” option or define your own categories with &lt;/SPAN&gt;&lt;SPAN&gt;proc format&lt;/SPAN&gt;&lt;SPAN&gt; and the “&lt;/SPAN&gt;&lt;SPAN&gt;discrete&lt;/SPAN&gt;&lt;SPAN&gt;” option to display &lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;no more than five&lt;/I&gt;&lt;/STRONG&gt; &lt;SPAN&gt;levels of either visits or visit rates.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;This is my code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;BR /&gt;proc sort data = saslab3;&lt;BR /&gt;	by sex= 'female' cause= 'storke';&lt;BR /&gt;	run;&lt;BR /&gt;	&lt;BR /&gt;proc gmap map = usstates&lt;BR /&gt;		  data = saslab3&lt;BR /&gt;		  all;&lt;BR /&gt;	id sex ='female' cause= 'stroke';&lt;BR /&gt;	choro ER_Visit_rate / levels = 3 missing;&lt;BR /&gt;	run;&lt;BR /&gt;	quit;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;This is the error I am receiving when I run proc sort:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="saza_0-1648986764552.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70069i05123C9B526A099F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="saza_0-1648986764552.png" alt="saza_0-1648986764552.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This is my legend:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="saza_1-1648986802924.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70070i030EA7368F5ACDED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="saza_1-1648986802924.png" alt="saza_1-1648986802924.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When I run the GMAP code I get the following error:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="saza_0-1648987687747.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70071iB9163F8F7A9D8AC3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="saza_0-1648987687747.png" alt="saza_0-1648987687747.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I was told USstates exists in sas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Apr 2022 12:08:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Sas-gmap/m-p/805697#M39623</guid>
      <dc:creator>saza</dc:creator>
      <dc:date>2022-04-03T12:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sas gmap</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Sas-gmap/m-p/805701#M39624</link>
      <description>&lt;P&gt;From now on, please include logs as plain text (not screen captures) by clicking on the &amp;lt;/&amp;gt; icon and then pasting your log into the window that appears.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Insert Log Icon in SAS Communities.png" style="width: 859px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66171iFEC370B1DBF07B28/image-size/large?v=v2&amp;amp;px=999" role="button" title="Insert Log Icon in SAS Communities.png" alt="Insert Log Icon in SAS Communities.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You cannot do subsetting in a BY statement or an ID statement. You do subsetting in a &lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lestmtsref/n1xbr9r0s9veq0n137iftzxq4g7e.htm" target="_self"&gt;WHERE statement&lt;/A&gt;, you can do this in PROC GMAP, and then PROC SORT isn't needed. Give it a try.&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/413742"&gt;@saza&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;When I run the GMAP code I get the following error:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="saza_0-1648987687747.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70071iB9163F8F7A9D8AC3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="saza_0-1648987687747.png" alt="saza_0-1648987687747.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I was told USstates exists in sas?&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;If you look in your WORK library, you do not see USSTATES, so you have the wrong library. If you look in the MAPSGFK library, you find a data set that is spelled US_STATES, perhaps that is the one you want.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Apr 2022 12:18:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Sas-gmap/m-p/805701#M39624</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-03T12:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sas gmap</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Sas-gmap/m-p/805704#M39625</link>
      <description>I was able to sort in both gmap and proc sort, thank you!&lt;BR /&gt;I am now only getting an error that states "sex" is not a variable on the US_States map. I am having trouble accessing that map so I can rename the sex variable within it.</description>
      <pubDate>Sun, 03 Apr 2022 12:45:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Sas-gmap/m-p/805704#M39625</guid>
      <dc:creator>saza</dc:creator>
      <dc:date>2022-04-03T12:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sas gmap</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Sas-gmap/m-p/805722#M39626</link>
      <description>&lt;P&gt;Yes, US_STATES is a map data set, it contains the co-ordinates of the boundaries of the different states so that a map can be drawn. It doesn't contain SEX.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You provide a "legend" showing a variable named SEX, what data set is that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, no need for PROC SORT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 15:17:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Sas-gmap/m-p/805722#M39626</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-04T15:17:22Z</dc:date>
    </item>
  </channel>
</rss>

