<?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 Summary based on Text Variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649432#M194704</link>
    <description>&lt;P&gt;Please look over the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Indicator  Range                      Number
i_20304    &amp;gt;= 1.64214 AND &amp;lt; 2.03922     14
i_20304    &amp;gt;= 1.64214 AND &amp;lt; 2.43629     19
i_20304    &amp;gt;= 1.64214 AND &amp;lt; 2.83337     11
i_20304    &amp;gt;= 1.64214 AND &amp;lt; 3.23044     17
i_20304    &amp;gt;= 1.64214 AND &amp;lt; 3.62751     13
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The Range refers to the particular Indicator, and Number of those.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data set contains over 5 million rows of such.&amp;nbsp; Different Indicators, different Ranges, different Numbers of each.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to summarize all this data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc Freq works great as far as Indicator and Number.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But incorporating Range (a categorical variable) into the summary is a mystery.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One possibility would be to concatenate Indicator and Range.&amp;nbsp; Then use Proc Freq.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts on this are greatly appreciated.&amp;nbsp; Particularly any other procedure that can handle "ranges" of data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nicholas Kormanik&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 May 2020 01:48:01 GMT</pubDate>
    <dc:creator>NKormanik</dc:creator>
    <dc:date>2020-05-21T01:48:01Z</dc:date>
    <item>
      <title>Summary based on Text Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649432#M194704</link>
      <description>&lt;P&gt;Please look over the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Indicator  Range                      Number
i_20304    &amp;gt;= 1.64214 AND &amp;lt; 2.03922     14
i_20304    &amp;gt;= 1.64214 AND &amp;lt; 2.43629     19
i_20304    &amp;gt;= 1.64214 AND &amp;lt; 2.83337     11
i_20304    &amp;gt;= 1.64214 AND &amp;lt; 3.23044     17
i_20304    &amp;gt;= 1.64214 AND &amp;lt; 3.62751     13
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The Range refers to the particular Indicator, and Number of those.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data set contains over 5 million rows of such.&amp;nbsp; Different Indicators, different Ranges, different Numbers of each.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to summarize all this data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc Freq works great as far as Indicator and Number.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But incorporating Range (a categorical variable) into the summary is a mystery.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One possibility would be to concatenate Indicator and Range.&amp;nbsp; Then use Proc Freq.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts on this are greatly appreciated.&amp;nbsp; Particularly any other procedure that can handle "ranges" of data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nicholas Kormanik&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 01:48:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649432#M194704</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2020-05-21T01:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Summary based on Text Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649438#M194709</link>
      <description>&lt;P&gt;What is the summary you want supposed to look like?&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 02:54:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649438#M194709</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2020-05-21T02:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Summary based on Text Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649440#M194711</link>
      <description>&lt;P&gt;Split your "range" into an upper and lower value so that you can summarize it in a different manner. You may need 4 variables if you need to capture the &amp;lt; or &amp;lt;= as well.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 02:58:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649440#M194711</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-05-21T02:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Summary based on Text Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649453#M194717</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;What is the summary you want supposed to look like?&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;How about ANY summary anyone can think of, for starters?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 05:25:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649453#M194717</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2020-05-21T05:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Summary based on Text Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649454#M194718</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;You may need 4 variables if you need to capture the &amp;lt; or &amp;lt;= as well.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Willing to add as many more variables as it takes.&lt;/P&gt;
&lt;P&gt;What do you have in mind?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 05:28:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649454#M194718</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2020-05-21T05:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Summary based on Text Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649456#M194720</link>
      <description>&lt;P&gt;I know we can graphically plot POINTS.&amp;nbsp; Nicely.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible in SAS to plot RANGES?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can do that in Mathematica.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A graph would make a terrific summary....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Particularly, in the present case, if there's a little number next to each Range showing the total number of such ranges for that Indicator.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Like, for instance:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(54,321)&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;i_20304    &amp;gt;= 1.64214 AND &amp;lt; 2.03922&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remember, there are over 5 million such lines in the data set.&amp;nbsp; So, the above says there are 54,321 cases of this particular Indicator, and this particular Range.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 05:42:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649456#M194720</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2020-05-21T05:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Summary based on Text Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649461#M194724</link>
      <description>&lt;P&gt;&amp;gt; But incorporating Range (a categorical variable) into the summary is a mystery.&lt;/P&gt;
&lt;P&gt;Why? What's different from the&amp;nbsp;categorical variable&amp;nbsp; INDICATOR?&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 06:20:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649461#M194724</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-05-21T06:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Summary based on Text Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649466#M194726</link>
      <description>&lt;P&gt;Both are categorical variables, yes.&amp;nbsp; I haven't yet tried using Range in Proc Freq, thinking that it's so untypical, weird.&amp;nbsp; That there is probably some other way of handling it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 06:59:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649466#M194726</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2020-05-21T06:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Summary based on Text Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649473#M194728</link>
      <description>I have no idea what issue you want to solve.&lt;BR /&gt;</description>
      <pubDate>Thu, 21 May 2020 07:11:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649473#M194728</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-05-21T07:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Summary based on Text Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649487#M194730</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I have no idea what issue you want to solve.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No worries, Chris.&amp;nbsp; Maybe next time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I'm attempting to do is to &lt;STRONG&gt;SUMMARIZE&lt;/STRONG&gt; over 5 million rows of data, as given in part above.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Simply paging down that much data is nearly impossible to get a true sense of.&amp;nbsp; Somehow it all has to be summarized.&amp;nbsp; A set of graphs?&amp;nbsp; Using Proc Freq?&amp;nbsp; Some other....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 07:48:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649487#M194730</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2020-05-21T07:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Summary based on Text Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649628#M194795</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/22691"&gt;@NKormanik&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I have no idea what issue you want to solve.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No worries, Chris.&amp;nbsp; Maybe next time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I'm attempting to do is to &lt;STRONG&gt;SUMMARIZE&lt;/STRONG&gt; over 5 million rows of data, as given in part above.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Simply paging down that much data is nearly impossible to get a true sense of.&amp;nbsp; Somehow it all has to be summarized.&amp;nbsp; A set of graphs?&amp;nbsp; Using Proc Freq?&amp;nbsp; Some other....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT size="6"&gt;&lt;STRONG&gt;Hint: Provide a small example of the data and what the "summarized" version looks like.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;Make sure the example data matches the rules you posted.&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&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 &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 16:30:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649628#M194795</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-05-21T16:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Summary based on Text Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649643#M194801</link>
      <description>&lt;P&gt;1 Split your range variable into 4 variables, upper_bound, lower_bound, upper_inequality, lower_inequality.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then your range of&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;&amp;gt;= 1.64214 AND &amp;lt; 2.03922 &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;becomes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;upper_bound = 2.03992&lt;/P&gt;
&lt;P&gt;lower_bound = 1.64214&lt;/P&gt;
&lt;P&gt;upper_inequality = LT&lt;/P&gt;
&lt;P&gt;lower_inequality = GE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can use that to graph the ranges as a band or area in SGPLOT.&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/22691"&gt;@NKormanik&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;You may need 4 variables if you need to capture the &amp;lt; or &amp;lt;= as well.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Willing to add as many more variables as it takes.&lt;/P&gt;
&lt;P&gt;What do you have in mind?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 17:05:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary-based-on-Text-Variable/m-p/649643#M194801</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-05-21T17:05:05Z</dc:date>
    </item>
  </channel>
</rss>

