<?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: Summary statistics on rows, Categories in Columns in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Summary-statistics-on-rows-Categories-in-Columns/m-p/273617#M15963</link>
    <description>&lt;P&gt;PROC TABULATE does that easily enough.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are the variable names?&lt;/P&gt;</description>
    <pubDate>Fri, 27 May 2016 15:33:13 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2016-05-27T15:33:13Z</dc:date>
    <item>
      <title>Summary statistics on rows, Categories in Columns</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Summary-statistics-on-rows-Categories-in-Columns/m-p/273613#M15962</link>
      <description>&lt;P&gt;I have a dataset with characteristics of households. &amp;nbsp;I want to produce a table similar to the one in the picture below. &amp;nbsp;The relevant point is that the columns are a categorical variable, while the rows are summary statistics. &amp;nbsp;It's easy to do the opposite in TABULATE or REPORT, putting the categories on the rows and the summary statistics in the columns. &amp;nbsp;I could write the output to a dataset, transpose it, and then print it. &amp;nbsp;I could compute the statistics with PROC SUMMARY and then do something similar. &amp;nbsp;I'm hoping to find a less complicated solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there some way to produce what I want in one step?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;. &amp;nbsp;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3367i58E8D58CDEFF7819/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="table shell.PNG" title="table shell.PNG" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 15:28:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Summary-statistics-on-rows-Categories-in-Columns/m-p/273613#M15962</guid>
      <dc:creator>Davanden</dc:creator>
      <dc:date>2016-05-27T15:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Summary statistics on rows, Categories in Columns</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Summary-statistics-on-rows-Categories-in-Columns/m-p/273617#M15963</link>
      <description>&lt;P&gt;PROC TABULATE does that easily enough.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are the variable names?&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 15:33:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Summary-statistics-on-rows-Categories-in-Columns/m-p/273617#M15963</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-05-27T15:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Summary statistics on rows, Categories in Columns</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Summary-statistics-on-rows-Categories-in-Columns/m-p/273621#M15964</link>
      <description>&lt;P&gt;If you get what you want with tabulate but need to transpose the output then just change the order in the TABLE statement.&lt;/P&gt;
&lt;P&gt;You likey currently have something like&lt;/P&gt;
&lt;P&gt;Table Classvar1 Classvar2 Classvar3 ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Var1*(n mean)&amp;nbsp; Var2*(n mean)&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;just change the order to&lt;/P&gt;
&lt;P&gt;Table Var1*(n mean)&amp;nbsp; Var2*(n mean) ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Classvar1 Classvar2 Classvar3&amp;nbsp;&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 15:39:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Summary-statistics-on-rows-Categories-in-Columns/m-p/273621#M15964</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-05-27T15:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Summary statistics on rows, Categories in Columns</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Summary-statistics-on-rows-Categories-in-Columns/m-p/273624#M15965</link>
      <description>&lt;P&gt;Number of persons in household is NUMPEOPLE&lt;/P&gt;&lt;P&gt;Number of children in household is ICHIL&lt;/P&gt;&lt;P&gt;The problem measures are flags. &amp;nbsp;For discussion purposes, call them SEVERE, MODERATE, and NONE.&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 15:41:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Summary-statistics-on-rows-Categories-in-Columns/m-p/273624#M15965</guid>
      <dc:creator>Davanden</dc:creator>
      <dc:date>2016-05-27T15:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: Summary statistics on rows, Categories in Columns</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Summary-statistics-on-rows-Categories-in-Columns/m-p/273637#M15967</link>
      <description>&lt;P&gt;Just for discussion purposes, then, how about:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc tabulate data=have;&lt;/P&gt;
&lt;P&gt;class household_type;&lt;/P&gt;
&lt;P&gt;var ichil numpeople mild moderate severe;&lt;/P&gt;
&lt;P&gt;tables (numpeople ichil) * (sum mean) (severe moderate mild) * sum='Households',&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;all household_type;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is just to get the structure right. &amp;nbsp;We can always worry about the labeling later.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't test the code right now, so you may need to debug it a little.&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 16:16:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Summary-statistics-on-rows-Categories-in-Columns/m-p/273637#M15967</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-05-27T16:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Summary statistics on rows, Categories in Columns</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Summary-statistics-on-rows-Categories-in-Columns/m-p/273664#M15968</link>
      <description>&lt;P&gt;Thanks to everyone who replied. &amp;nbsp;I'm glad the answer was so simple.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--Dav&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 17:49:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Summary-statistics-on-rows-Categories-in-Columns/m-p/273664#M15968</guid>
      <dc:creator>Davanden</dc:creator>
      <dc:date>2016-05-27T17:49:45Z</dc:date>
    </item>
  </channel>
</rss>

