<?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 Transposing Statistics from PROC MEANS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Transposing-Statistics-from-PROC-MEANS/m-p/545654#M150990</link>
    <description>&lt;P&gt;I finally was able to use the import wizard to convert my excel table into SAS. First time I am using excel.with data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached my excel&lt;/P&gt;&lt;P&gt;I would like mean and standard deviation per column and rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cant do it correctly./Can anybody provide with simple code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 24 Mar 2019 23:29:08 GMT</pubDate>
    <dc:creator>ralphbenno</dc:creator>
    <dc:date>2019-03-24T23:29:08Z</dc:date>
    <item>
      <title>Transposing Statistics from PROC MEANS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transposing-Statistics-from-PROC-MEANS/m-p/545654#M150990</link>
      <description>&lt;P&gt;I finally was able to use the import wizard to convert my excel table into SAS. First time I am using excel.with data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached my excel&lt;/P&gt;&lt;P&gt;I would like mean and standard deviation per column and rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cant do it correctly./Can anybody provide with simple code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Mar 2019 23:29:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transposing-Statistics-from-PROC-MEANS/m-p/545654#M150990</guid>
      <dc:creator>ralphbenno</dc:creator>
      <dc:date>2019-03-24T23:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Transposing Statistics from PROC MEANS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transposing-Statistics-from-PROC-MEANS/m-p/545657#M150992</link>
      <description>&lt;P&gt;Sure, you likely want to be using the STACKODS options.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you run these examples and follow them through, you'll see the different kinds of output you can get. In this particular case the analysis is grouped by ID and feature, so different statistics for each ID level. If you don't need this, ignore the BY statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*Create summary statistics for a dataset by a 'grouping' variable and store it in a dataset;

*Generate sample fake data;
data have;
	input ID          feature1         feature2         feature3;
	cards;
1               7.72               5.43              4.35
1               5.54               2.25              8.22 
1               4.43               6.75              2.22
1               3.22               3.21              7.31
2               6.72               2.86              6.11
2               5.89               4.25              5.25 
2               3.43               7.30              8.21
2               1.22               3.55              6.55

;
run;

*Create summary data;
proc means data=have noprint;
	by id;
	var feature1-feature3;
	output out=want median= var= mean= /autoname;
run;

*Show for display;
proc print data=want;
run;

*First done here:https://communities.sas.com/t5/General-SAS-Programming/Getting-creating-new-summary-variables-longitudinal-data/m-p/347940/highlight/false#M44842;
*Another way to present data is as follows;

proc means data=have stackods nway n min max mean median std p5 p95;
    by id;
    var feature1-feature3;
    ods output summary=want2;
run;

*Show for display;
proc print data=want2;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;A href="https://github.com/statgeek/SAS-Tutorials/blob/master/proc_means_basic.sas" target="_blank"&gt;https://github.com/statgeek/SAS-Tutorials/blob/master/proc_means_basic.sas&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And some other useful ones here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=proc&amp;amp;docsetVersion=9.4&amp;amp;docsetTarget=p13nj9tbyfmmwyn1az938n5wic3p.htm&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=proc&amp;amp;docsetVersion=9.4&amp;amp;docsetTarget=p13nj9tbyfmmwyn1az938n5wic3p.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Note there are more examples, click through the menu on the left hand side to see the other variations.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Specifically STACKODS here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=proc&amp;amp;docsetVersion=9.4&amp;amp;docsetTarget=p17h6q7ygvkl1sn13qzf947dundi.htm&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=proc&amp;amp;docsetVersion=9.4&amp;amp;docsetTarget=p17h6q7ygvkl1sn13qzf947dundi.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/260928"&gt;@ralphbenno&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I finally was able to use the import wizard to convert my excel table into SAS. First time I am using excel.with data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have attached my excel&lt;/P&gt;
&lt;P&gt;I would like mean and standard deviation per column and rows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cant do it correctly./Can anybody provide with simple code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Mar 2019 23:36:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transposing-Statistics-from-PROC-MEANS/m-p/545657#M150992</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-03-24T23:36:58Z</dc:date>
    </item>
  </channel>
</rss>

