<?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: Percentages in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Percentages/m-p/696904#M25306</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/355707"&gt;@Jonas3007&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a few questions (Completely new to SAS) I have the following table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;Outcome&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;Treatment&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;Recurring UTI&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;No new UTI&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;Total&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;Cranberry Juice&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;8&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;42&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;50&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;Lactobacillus drink&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;19&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;30&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;49&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;Control&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;18&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;32&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;50&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Question about percentages.&amp;nbsp;I need to convert each value into their respective percentages and get the chi-square. what would be the steps to create this table in SAS (exactly as it shows) and then make the same table but showing the values in percentages? I tried using proc freq but it just shows me the percentage of the total column.&lt;/P&gt;
&lt;P&gt;2. from this table, how can I get the chi-square?&lt;/P&gt;
&lt;P&gt;3. Finally, how do I make a graph to compare these percents?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Whenever you discuss percentage you &lt;STRONG&gt;must&lt;/STRONG&gt; define what the denominator and numerator are for the calculation. Which you don't do. So, what are the denominators and numerators.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without an actual data set it is hard to write code.&lt;/P&gt;
&lt;P&gt;Without seeing the code you attempted we have no idea what may or may not have been done.&lt;/P&gt;
&lt;P&gt;And many people new to SAS whose "training" came from working with spreadsheets often have separate variables (columns, rows) such as "recurring" and "new" instead of a single variable possibly named "outcome" with two levels of values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you provide an example of your data? Either in the form of a data step or at least proc print or similar output?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Nov 2020 15:31:39 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-11-05T15:31:39Z</dc:date>
    <item>
      <title>Percentages</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Percentages/m-p/696891#M25304</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a few questions (Completely new to SAS) I have the following table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Outcome&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Treatment&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Recurring UTI&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;No new UTI&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Total&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Cranberry Juice&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;8&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;42&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;50&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Lactobacillus drink&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;19&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;30&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;49&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Control&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;18&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;32&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;50&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Question about percentages.&amp;nbsp;I need to convert each value into their respective percentages and get the chi-square. what would be the steps to create this table in SAS (exactly as it shows) and then make the same table but showing the values in percentages? I tried using proc freq but it just shows me the percentage of the total column.&lt;/P&gt;&lt;P&gt;2. from this table, how can I get the chi-square?&lt;/P&gt;&lt;P&gt;3. Finally, how do I make a graph to compare these percents?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 14:49:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Percentages/m-p/696891#M25304</guid>
      <dc:creator>Jonas3007</dc:creator>
      <dc:date>2020-11-05T14:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Percentages</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Percentages/m-p/696904#M25306</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/355707"&gt;@Jonas3007&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a few questions (Completely new to SAS) I have the following table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;Outcome&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;Treatment&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;Recurring UTI&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;No new UTI&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;Total&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;Cranberry Juice&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;8&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;42&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;50&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;Lactobacillus drink&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;19&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;30&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;49&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;Control&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;18&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;32&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;50&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Question about percentages.&amp;nbsp;I need to convert each value into their respective percentages and get the chi-square. what would be the steps to create this table in SAS (exactly as it shows) and then make the same table but showing the values in percentages? I tried using proc freq but it just shows me the percentage of the total column.&lt;/P&gt;
&lt;P&gt;2. from this table, how can I get the chi-square?&lt;/P&gt;
&lt;P&gt;3. Finally, how do I make a graph to compare these percents?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Whenever you discuss percentage you &lt;STRONG&gt;must&lt;/STRONG&gt; define what the denominator and numerator are for the calculation. Which you don't do. So, what are the denominators and numerators.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without an actual data set it is hard to write code.&lt;/P&gt;
&lt;P&gt;Without seeing the code you attempted we have no idea what may or may not have been done.&lt;/P&gt;
&lt;P&gt;And many people new to SAS whose "training" came from working with spreadsheets often have separate variables (columns, rows) such as "recurring" and "new" instead of a single variable possibly named "outcome" with two levels of values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you provide an example of your data? Either in the form of a data step or at least proc print or similar output?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 15:31:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Percentages/m-p/696904#M25306</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-05T15:31:39Z</dc:date>
    </item>
  </channel>
</rss>

