<?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: Distribution of case and controls in different age groups - Plot &amp;amp; table in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Distribution-of-case-and-controls-in-different-age-groups-Plot/m-p/701190#M14473</link>
    <description>Thank you ~ Petri</description>
    <pubDate>Tue, 24 Nov 2020 11:47:38 GMT</pubDate>
    <dc:creator>mantubiradar19</dc:creator>
    <dc:date>2020-11-24T11:47:38Z</dc:date>
    <item>
      <title>Distribution of case and controls in different age groups - Plot &amp; table</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Distribution-of-case-and-controls-in-different-age-groups-Plot/m-p/700843#M14468</link>
      <description>&lt;P&gt;I have a dataset containing binary variable DIAGNOSIS (0 &amp;amp; 1 for control and case) and the range of AGE is from 20 ~ 80. I'm interested to see the distribution (# of cases &amp;amp; controls) in various age groups with an interval of 10 years. (20~30, 30~40, 50~60, 60~70, etc).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please suggest to me how to obtain suitable tables and plots to visualize my data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS: I have attached an example&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Distribution-of-cases-and-controls-by-their-age-groups.jpg" style="width: 729px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51921iC4CC1E46306C44EE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Distribution-of-cases-and-controls-by-their-age-groups.jpg" alt="Distribution-of-cases-and-controls-by-their-age-groups.jpg" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 05:49:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Distribution-of-case-and-controls-in-different-age-groups-Plot/m-p/700843#M14468</guid>
      <dc:creator>mantubiradar19</dc:creator>
      <dc:date>2020-11-23T05:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Distribution of case and controls in different age groups - Plot &amp; table</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Distribution-of-case-and-controls-in-different-age-groups-Plot/m-p/701156#M14470</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16379"&gt;@mantubiradar19&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following instructions are based on the assumptions that the data is aligned like this:&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 96pt;" border="0" width="128" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" style="height: 15.0pt; width: 48pt;"&gt;Age&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;Diagnosis&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;37&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;76&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;29&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt;"&gt;…&lt;/TD&gt;
&lt;TD class="xl63"&gt;…&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Steps taken&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create &lt;FONT face="courier new,courier"&gt;Age group &lt;FONT face="arial,helvetica,sans-serif"&gt;category&lt;/FONT&gt;&lt;/FONT&gt;:&amp;nbsp;&lt;BR /&gt;Use the&amp;nbsp;&lt;STRONG&gt;Custom category&lt;/STRONG&gt; feature to create age buckets.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51947iBA91F76BB5FB5FDB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture1.PNG" alt="Capture1.PNG" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Create &lt;FONT face="courier new,courier"&gt;&lt;FONT face="courier new,courier"&gt;Cases&lt;FONT face="arial,helvetica,sans-serif"&gt; measure&lt;/FONT&gt;:&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Use the &lt;STRONG&gt;New Calculated Item&lt;/STRONG&gt; feature to calculate number cases.&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;PRE&gt;IF ( 'Diagnosis'n = 1 )
RETURN 1
ELSE 0&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Create &lt;FONT face="courier new,courier"&gt;&lt;FONT face="courier new,courier"&gt;Controls&lt;FONT face="arial,helvetica,sans-serif"&gt; measure&lt;/FONT&gt;:&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Use the &lt;STRONG&gt;New Calculated Item&lt;/STRONG&gt; feature to calculate number of controls.&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;PRE&gt;IF ( 'Diagnosis'n = 0 )
RETURN 1
ELSE 0&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;Create &lt;FONT face="courier new,courier"&gt;&lt;FONT face="courier new,courier"&gt;Total&lt;FONT face="arial,helvetica,sans-serif"&gt;&amp;nbsp;measure&lt;/FONT&gt;:&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Use the &lt;STRONG&gt;New Calculated Item&lt;/STRONG&gt; feature to calculate number of cases + controls.&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;PRE&gt;'Cases'n + 'Controls'n&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Create &lt;FONT face="courier new,courier"&gt;Cases %&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;Controls %&lt;/FONT&gt;, and &lt;FONT face="courier new,courier"&gt;Total %&lt;/FONT&gt;&lt;BR /&gt;Use the&amp;nbsp;&lt;STRONG&gt;New Calculated item&lt;/STRONG&gt; feature to calculate three new aggregated measures.&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Cases %&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;PRE&gt;Sum [_ByGroup_] ('Cases'n) / Sum [_ForAll_] ('Cases'n)&lt;/PRE&gt;
&lt;FONT face="courier new,courier"&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;FONT face="courier new,courier"&gt;Controls %&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;PRE&gt;Sum [_ByGroup_] ('Controls'n) / Sum [_ForAll_] ('Controls'n)&lt;/PRE&gt;
&lt;FONT face="courier new,courier"&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;FONT face="courier new,courier"&gt;Total %&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;PRE&gt;Sum [_ByGroup_] ('Total'n) / Sum [_ForAll_] ('Total'n)&lt;/PRE&gt;
&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Utilize Crosstab object and assign roles as below&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.PNG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51949i3BE1D15188598CF2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="Capture2.PNG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;I hope this helps.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Best regards,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Petri&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 06:17:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Distribution-of-case-and-controls-in-different-age-groups-Plot/m-p/701156#M14470</guid>
      <dc:creator>PetriRoine</dc:creator>
      <dc:date>2020-11-24T06:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Distribution of case and controls in different age groups - Plot &amp; table</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Distribution-of-case-and-controls-in-different-age-groups-Plot/m-p/701190#M14473</link>
      <description>Thank you ~ Petri</description>
      <pubDate>Tue, 24 Nov 2020 11:47:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Distribution-of-case-and-controls-in-different-age-groups-Plot/m-p/701190#M14473</guid>
      <dc:creator>mantubiradar19</dc:creator>
      <dc:date>2020-11-24T11:47:38Z</dc:date>
    </item>
  </channel>
</rss>

