<?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: Making a categorical variable from two date variables, and a summary table in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Making-a-categorical-variable-from-two-date-variables-and-a/m-p/699215#M25584</link>
    <description>&lt;P&gt;Run this macro&lt;STRIKE&gt; once for each group subset and then merge the results together is your quickest way.&lt;/STRIKE&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Demographic-Table-and-Subgroup-Summary-Macro-TABLEN/ta-p/634030" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Demographic-Table-and-Subgroup-Summary-Macro-TABLEN/ta-p/634030&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Nov 2020 16:43:31 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-11-16T16:43:31Z</dc:date>
    <item>
      <title>Making a categorical variable from two date variables, and a summary table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Making-a-categorical-variable-from-two-date-variables-and-a/m-p/699131#M25581</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Its' the been awake for more than 24hours newbie. Back with another question, I would greatly appreciate the help :'(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help making a table of summary statistics, and I need to stratify that table with a categorical variable. The categorical variable is hospital stay, and in my dataset I have data for hospital admission date, and hospital discharge date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know how to make a means table for all variables and a univariate table, but I don't know how to put them all together, and I don't know how to future stratify it by that categorical variable. Please help &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-11-16 at 4.49.42 AM.png" style="width: 739px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51704i3295EEC35A3DF4A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-11-16 at 4.49.42 AM.png" alt="Screen Shot 2020-11-16 at 4.49.42 AM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-11-16 at 4.45.47 AM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51705iF93E2C7A363749F8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-11-16 at 4.45.47 AM.png" alt="Screen Shot 2020-11-16 at 4.45.47 AM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-11-16 at 4.45.34 AM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51706i2BDBEA0E840A5F11/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-11-16 at 4.45.34 AM.png" alt="Screen Shot 2020-11-16 at 4.45.34 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've attached photos of what my table is supposed to look like, and my data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;edit: To add code. the reason I didn't in the first place was because I was entirely unsure of what code to use....&lt;/P&gt;&lt;P&gt;To create a stratified table, this is what I think to use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data = dataset;
by stratifying_variable;
table variable2;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, I don't know how to adjust this so that i get a summary statistics table for all of the variables in my set.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 13:53:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Making-a-categorical-variable-from-two-date-variables-and-a/m-p/699131#M25581</guid>
      <dc:creator>araren</dc:creator>
      <dc:date>2020-11-16T13:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Making a categorical variable from two date variables, and a summary table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Making-a-categorical-variable-from-two-date-variables-and-a/m-p/699132#M25582</link>
      <description>&lt;P&gt;you will get a faster response if you post your data as provided by &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;these instructions&lt;/A&gt;, and not as a screen capture.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 13:44:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Making-a-categorical-variable-from-two-date-variables-and-a/m-p/699132#M25582</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-11-16T13:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Making a categorical variable from two date variables, and a summary table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Making-a-categorical-variable-from-two-date-variables-and-a/m-p/699137#M25583</link>
      <description>Have edited with code. Not quite sure of what code to use even, hence the screencaps.</description>
      <pubDate>Mon, 16 Nov 2020 13:54:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Making-a-categorical-variable-from-two-date-variables-and-a/m-p/699137#M25583</guid>
      <dc:creator>araren</dc:creator>
      <dc:date>2020-11-16T13:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Making a categorical variable from two date variables, and a summary table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Making-a-categorical-variable-from-two-date-variables-and-a/m-p/699215#M25584</link>
      <description>&lt;P&gt;Run this macro&lt;STRIKE&gt; once for each group subset and then merge the results together is your quickest way.&lt;/STRIKE&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Demographic-Table-and-Subgroup-Summary-Macro-TABLEN/ta-p/634030" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Demographic-Table-and-Subgroup-Summary-Macro-TABLEN/ta-p/634030&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 16:43:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Making-a-categorical-variable-from-two-date-variables-and-a/m-p/699215#M25584</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-11-16T16:43:31Z</dc:date>
    </item>
  </channel>
</rss>

