<?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: proc tabulate in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate/m-p/517623#M139996</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/240770"&gt;@Ranjeeta&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;PROC TABULATE DATA=evt_qbp;&lt;BR /&gt;WHERE EX_LT90FU=0 AND EX_HISTORY~=1;&lt;BR /&gt;FORMAT FLAG_POSTDX YESNO_FMT.;&lt;BR /&gt;CLASS FLAG_POSTDX;&lt;BR /&gt;CLASS FACILITY_NO / ORDER=FREQ;&lt;BR /&gt;VAR HOMETIME;&lt;BR /&gt;TABLES FACILITY_NO ALL,&lt;BR /&gt;(ALL='Includes In-hospital Strokes' FLAG_POSTDX)*HOMETIME&lt;BR /&gt;*(N='Included Cases' MEDIAN );&lt;BR /&gt;TITLE1 "EVT Indicator 6: Home Time within 90-Days Following EVT, FY2017/2018";&lt;BR /&gt;TITLE2 "Including Deaths within 90 Days Following EVT";&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone advise if the code above will correctly calculate the toal cases and the median for only the variable Hometime&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also what happens if I include ne additional in the var statement&amp;nbsp;&lt;/P&gt;
&lt;P&gt;will the total and median be calculated for both variables in the var statement&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Maxim 4: try it.&lt;/P&gt;</description>
    <pubDate>Fri, 30 Nov 2018 19:49:19 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-11-30T19:49:19Z</dc:date>
    <item>
      <title>proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate/m-p/517611#M139991</link>
      <description>&lt;P&gt;PROC TABULATE DATA=evt_qbp;&lt;BR /&gt;WHERE EX_LT90FU=0 AND EX_HISTORY~=1;&lt;BR /&gt;FORMAT FLAG_POSTDX YESNO_FMT.;&lt;BR /&gt;CLASS FLAG_POSTDX;&lt;BR /&gt;CLASS FACILITY_NO / ORDER=FREQ;&lt;BR /&gt;VAR HOMETIME;&lt;BR /&gt;TABLES FACILITY_NO ALL,&lt;BR /&gt;(ALL='Includes In-hospital Strokes' FLAG_POSTDX)*HOMETIME&lt;BR /&gt;*(N='Included Cases' MEDIAN );&lt;BR /&gt;TITLE1 "EVT Indicator 6: Home Time within 90-Days Following EVT, FY2017/2018";&lt;BR /&gt;TITLE2 "Including Deaths within 90 Days Following EVT";&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone advise if the code above will correctly calculate the toal cases and the median for only the variable Hometime&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also what happens if I include ne additional in the var statement&amp;nbsp;&lt;/P&gt;&lt;P&gt;will the total and median be calculated for both variables in the var statement&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 19:02:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate/m-p/517611#M139991</guid>
      <dc:creator>Ranjeeta</dc:creator>
      <dc:date>2018-11-30T19:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate/m-p/517623#M139996</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/240770"&gt;@Ranjeeta&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;PROC TABULATE DATA=evt_qbp;&lt;BR /&gt;WHERE EX_LT90FU=0 AND EX_HISTORY~=1;&lt;BR /&gt;FORMAT FLAG_POSTDX YESNO_FMT.;&lt;BR /&gt;CLASS FLAG_POSTDX;&lt;BR /&gt;CLASS FACILITY_NO / ORDER=FREQ;&lt;BR /&gt;VAR HOMETIME;&lt;BR /&gt;TABLES FACILITY_NO ALL,&lt;BR /&gt;(ALL='Includes In-hospital Strokes' FLAG_POSTDX)*HOMETIME&lt;BR /&gt;*(N='Included Cases' MEDIAN );&lt;BR /&gt;TITLE1 "EVT Indicator 6: Home Time within 90-Days Following EVT, FY2017/2018";&lt;BR /&gt;TITLE2 "Including Deaths within 90 Days Following EVT";&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone advise if the code above will correctly calculate the toal cases and the median for only the variable Hometime&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also what happens if I include ne additional in the var statement&amp;nbsp;&lt;/P&gt;
&lt;P&gt;will the total and median be calculated for both variables in the var statement&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Maxim 4: try it.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 19:49:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate/m-p/517623#M139996</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-11-30T19:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate/m-p/517625#M139997</link>
      <description>&lt;P&gt;Proc Tabulate will only calculate statistics other than the "N"&amp;nbsp; related statistics (N pctn colpctn rowpctn) for variables declared on a VAR statement.&amp;nbsp; "Correctly" depends on what you intend, especially when you say" the total cases&amp;nbsp;"; If you want an overall including both the ROW and the COLUMN values then you want have an ALL on the row dimension as well.&lt;/P&gt;
&lt;P&gt;Your code will create one column for each level of FLAG_POSTDX and all combined for each level of the row&amp;nbsp;variable FACILITY_NO ALL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If weren't&amp;nbsp;aware, the Proc Tabulate will by default remove any record that has a missing value for any of the CLASS variables. So that can also impact "correctly".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Generally to request the same statistics for multiple variables place the variables within parentheses and the statistics in another set of parentheses with the * between them. See an example:&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=sashelp.class;
   class sex;
   var height weight;
   table sex,
         (height weight) *(n max min median)
   ;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;if they are not inside () then the variables are treated a separate requests and could request the same or different statistics&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=sashelp.class;
   class sex;
   var height weight;
   table sex,
         height  *(n max min median)
         weight * (mean std)
   ;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Nov 2018 19:55:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate/m-p/517625#M139997</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-11-30T19:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate/m-p/517627#M139999</link>
      <description>&lt;P&gt;What problem (doubt)&amp;nbsp;did you run into with the stated syntax?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What happens when you include another variable in the VAR statement depends on&amp;nbsp;where you include this new variable in&amp;nbsp;the TABLES statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you say&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VAR HOMETIME OtherVar;&lt;BR /&gt;TABLES FACILITY_NO ALL,&lt;BR /&gt;(ALL='Includes In-hospital Strokes' FLAG_POSTDX)*(HOMETIME Othervar)&lt;BR /&gt;*(N='Included Cases' MEDIAN );&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you will get parallel columns for both VAR variables in each FLAG_POSTDX category and for ALL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 19:58:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate/m-p/517627#M139999</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-11-30T19:58:20Z</dc:date>
    </item>
  </channel>
</rss>

