<?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 Creation of new subcategory of Variable by summing existing variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creation-of-new-subcategory-of-Variable-by-summing-existing/m-p/228280#M308120</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following cancersitecategories in the "Cancersitecat" variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I create a new subcategory of variable called Breast total to sum both the breast categories?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cancersitecat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;breastinsitu female&lt;/P&gt;&lt;P&gt;breast invasive female&lt;/P&gt;&lt;P&gt;Colorectal&lt;/P&gt;&lt;P&gt;Lung and bronchus&lt;/P&gt;&lt;P&gt;Prostate&lt;/P&gt;&lt;P&gt;Total&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Oct 2015 20:11:01 GMT</pubDate>
    <dc:creator>Anushuya</dc:creator>
    <dc:date>2015-10-02T20:11:01Z</dc:date>
    <item>
      <title>Creation of new subcategory of Variable by summing existing variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creation-of-new-subcategory-of-Variable-by-summing-existing/m-p/228280#M308120</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following cancersitecategories in the "Cancersitecat" variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I create a new subcategory of variable called Breast total to sum both the breast categories?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cancersitecat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;breastinsitu female&lt;/P&gt;&lt;P&gt;breast invasive female&lt;/P&gt;&lt;P&gt;Colorectal&lt;/P&gt;&lt;P&gt;Lung and bronchus&lt;/P&gt;&lt;P&gt;Prostate&lt;/P&gt;&lt;P&gt;Total&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2015 20:11:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creation-of-new-subcategory-of-Variable-by-summing-existing/m-p/228280#M308120</guid>
      <dc:creator>Anushuya</dc:creator>
      <dc:date>2015-10-02T20:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Creation of new subcategory of Variable by summing existing variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creation-of-new-subcategory-of-Variable-by-summing-existing/m-p/228288#M308121</link>
      <description>&lt;P&gt;Explain in more detail. What are we summing? Show us a small part of this data set so we can grasp the problem.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2015 21:12:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creation-of-new-subcategory-of-Variable-by-summing-existing/m-p/228288#M308121</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-10-02T21:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Creation of new subcategory of Variable by summing existing variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creation-of-new-subcategory-of-Variable-by-summing-existing/m-p/228343#M308122</link>
      <description>&lt;P&gt;You could create a super category (&lt;EM&gt;CancerType&lt;/EM&gt;) and get totals within each super category. With &lt;STRONG&gt;proc Tabulate&lt;/STRONG&gt; as a summarizing procedure, it would be something like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data myNewData;
set myData;
if CancerSiteCat in ("breast insitu female", "breast invasive female") then
	CancerType = "breast";
else CancerType = "other";
run;

proc tabulate data=myNewData;
class CancerType CancerSiteCat;
table CancerType*(CancerSiteCat all="Total") all="Grand Total", n;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(untested)&lt;/P&gt;</description>
      <pubDate>Sun, 04 Oct 2015 03:33:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creation-of-new-subcategory-of-Variable-by-summing-existing/m-p/228343#M308122</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-10-04T03:33:14Z</dc:date>
    </item>
  </channel>
</rss>

