<?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: Using PROC FORMAT &amp;amp; PROC FREQ with mixed results - County Data in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Using-PROC-FORMAT-amp-PROC-FREQ-with-mixed-results-County-Data/m-p/574646#M75403</link>
    <description>&lt;P&gt;There are some very common county names such as Washington, Lincoln, Jefferson and Adams to pick on a few.&lt;/P&gt;
&lt;P&gt;This code may help identify your problem cases.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
   select distinct countynm, statename
   from sashelp.zipcode
   where state in (1:50)
   ;
quit;&lt;/PRE&gt;
&lt;P&gt;Or other information, if available, coupled with the SASHELP.ZIPCODE data set might help resolve some of the FIPS issues.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jul 2019 15:46:27 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-07-18T15:46:27Z</dc:date>
    <item>
      <title>Using PROC FORMAT &amp; PROC FREQ with mixed results - County Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Using-PROC-FORMAT-amp-PROC-FREQ-with-mixed-results-County-Data/m-p/574189#M75400</link>
      <description>&lt;P&gt;Hello, I'm currently using CPS ASEC data to tally all available counties in the data set. I combined state and county codes to create a standard FIPS State/County code and listed all counties in the US, including states containing unlisted counties (see code). This made for one very long PROC FORMAT.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm getting mixed results when I use and don't use the format. When the format is used, 241 levels are reported. When the format isn't used, 280 levels are reported. The 39 geographies that aren't in the original Proc Freq are listed in the Proc Format and are contained in the data set, so I don't understand why the original freq isn't displaying them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any insight appreciated.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data listed not_lstd; 
set work.ststst; 
if gxco = '000' then output not_lstd;
else if gxco not = '000' then output listed; 
run;

/*Gives frequencies for 329 levels identified and not-identified counties*/
proc freq data = work.ststst nlevels;
table stcofips / missing;
*no format;
run;

/*Gives frequencies for 241 identified counties*/
proc freq data = listed nlevels;
table stcofips / missprint;
format stcofips $counties. ;
*format stcofips $counties. ; /*280 levels when omitted*/ 
run; 

/*Gives frequencies for 49 not-identified counties within states*/&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;proc freq data = not_lstd nlevels;
tables stcofips / missprint;
format stcofips $counties. ;
run;&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="with format applied 241_levels.PNG" style="width: 237px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31086i4944DE90F90FB398/image-dimensions/237x136?v=v2" width="237" height="136" role="button" title="with format applied 241_levels.PNG" alt="with format applied 241_levels.PNG" /&gt;&lt;/span&gt;&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="with omitted format  280_levels.PNG" style="width: 219px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31085i676C4C6D68F03ABE/image-dimensions/219x126?v=v2" width="219" height="126" role="button" title="with omitted format  280_levels.PNG" alt="with omitted format  280_levels.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 14:22:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Using-PROC-FORMAT-amp-PROC-FREQ-with-mixed-results-County-Data/m-p/574189#M75400</guid>
      <dc:creator>deltron</dc:creator>
      <dc:date>2019-07-17T14:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC FORMAT &amp; PROC FREQ with mixed results - County Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Using-PROC-FORMAT-amp-PROC-FREQ-with-mixed-results-County-Data/m-p/574403#M75401</link>
      <description>This means that your format contains duplicated translations.  The values to the left of the equal sign are different but the translated values to the right of the equal sign are the same.  Applying the format collapses identical translated values into the same row of the table.</description>
      <pubDate>Thu, 18 Jul 2019 00:01:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Using-PROC-FORMAT-amp-PROC-FREQ-with-mixed-results-County-Data/m-p/574403#M75401</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-07-18T00:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC FORMAT &amp; PROC FREQ with mixed results - County Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Using-PROC-FORMAT-amp-PROC-FREQ-with-mixed-results-County-Data/m-p/574646#M75403</link>
      <description>&lt;P&gt;There are some very common county names such as Washington, Lincoln, Jefferson and Adams to pick on a few.&lt;/P&gt;
&lt;P&gt;This code may help identify your problem cases.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
   select distinct countynm, statename
   from sashelp.zipcode
   where state in (1:50)
   ;
quit;&lt;/PRE&gt;
&lt;P&gt;Or other information, if available, coupled with the SASHELP.ZIPCODE data set might help resolve some of the FIPS issues.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 15:46:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Using-PROC-FORMAT-amp-PROC-FREQ-with-mixed-results-County-Data/m-p/574646#M75403</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-07-18T15:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC FORMAT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Using-PROC-FORMAT-amp-PROC-FREQ-with-mixed-results-County-Data/m-p/574692#M75405</link>
      <description>This helps, as well. Thanks. Since it was only 39 counties, I went ahead and modified their respective format. I didn't realize PROC FORMAT would see the values to the right of the = sign as the same despite having a different FIPS ST code associated with it.</description>
      <pubDate>Thu, 18 Jul 2019 17:48:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Using-PROC-FORMAT-amp-PROC-FREQ-with-mixed-results-County-Data/m-p/574692#M75405</guid>
      <dc:creator>deltron</dc:creator>
      <dc:date>2019-07-18T17:48:37Z</dc:date>
    </item>
  </channel>
</rss>

