<?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 Means: Getting the same information in both html and data set outputs in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Means-Getting-the-same-information-in-both-html-and-data/m-p/88149#M4314</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much Anca!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I can get both html and the data set with the same information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ian.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jan 2013 15:41:32 GMT</pubDate>
    <dc:creator>iank131</dc:creator>
    <dc:date>2013-01-28T15:41:32Z</dc:date>
    <item>
      <title>Proc Means: Getting the same information in both html and data set outputs</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Means-Getting-the-same-information-in-both-html-and-data/m-p/88145#M4310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have my PROC MEANS output destination set to html. I am also trying to create a data set that has the same information as what appears in the html output and vice versa. However, the html output has things that I want in the data set and the data set has things I would like in the html output, but I can't seem to program PROC MEANS to make BOTH the html and data set to have the same information.&amp;nbsp; Could some one enlighten me how to do this easily, if it is at all possible to be done easily.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following is my sas code using the attached &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;sample data. Running the code, I get the sample_stats data set, which is also attached.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc means data=sample n mean median stddev max min skew kurtosis prt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var clean_ret dirty_retb2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; class bindx_cat;&lt;/P&gt;&lt;P&gt;&amp;nbsp; output out=sample_stats;&lt;/P&gt;&lt;P&gt;* output out=sample_stats n= mean= median= stddev= max= min= skew= kurtosis= prt=/autoname;&lt;/P&gt;&lt;P&gt;&amp;nbsp; title "Sample statistics";&lt;/P&gt;&lt;P&gt;run; title;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the following html output. &lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture1.JPG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3035_Capture1.JPG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;... and the data set has the following data:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture2.JPG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3036_Capture2.JPG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice the differences between these two outputs: &lt;/P&gt;&lt;P&gt;1. the html does not give the statistics of the full sample, but only of the INVESTMENT and NON-INVEST sub-samples. The data set, on the other hand, does give statistics of the full sample (_TYPE_ = 0 ).&lt;/P&gt;&lt;P&gt;2. the html gives all the statistics I asked for in the first line of the PROC MEANS code, but the data set does not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using the output statement that has been commented out in the sas code, but it is complicated to put this alternative data set in the format that I want, which is the way the html output appears.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one help me solve this problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 12:39:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Means-Getting-the-same-information-in-both-html-and-data/m-p/88145#M4310</guid>
      <dc:creator>iank131</dc:creator>
      <dc:date>2013-01-28T12:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means: Getting the same information in both html and data set outputs</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Means-Getting-the-same-information-in-both-html-and-data/m-p/88146#M4311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;iank131,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try adding the following types statement to the proc means code to add the total line to the html output:&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;class &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;bindx_cat&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;types &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;bindx_cat&lt;/SPAN&gt; ();&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The () actually add the total line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as requesting additional stats in the output... the only way I know is to request it on the output statement. Otherwise you get the default set of stats. If you want a vertical stack instead of horizontal listing you can transform it using transpose or data step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;EJ &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 13:38:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Means-Getting-the-same-information-in-both-html-and-data/m-p/88146#M4311</guid>
      <dc:creator>esjackso</dc:creator>
      <dc:date>2013-01-28T13:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means: Getting the same information in both html and data set outputs</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Means-Getting-the-same-information-in-both-html-and-data/m-p/88147#M4312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;you could use and ODS OUTPUT statement instead of OUTPU, something like this (I also incorporate the nice 'types ..()' as suggested by EJ above.&lt;/P&gt;&lt;P&gt;(I am using sashelp.class as an example)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc means data=sashelp.class n mean median stddev max min skew kurtosis prt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var age weight height;&lt;/P&gt;&lt;P&gt;&amp;nbsp; class sex;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG&gt;&amp;nbsp; types sex ();&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;ods output Summary = temp_means;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; title "Sample statistics";&lt;/P&gt;&lt;P&gt;run; title;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data temp_means;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set temp_means;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; if sex = " " then sex = "T";&amp;nbsp; *need to fill this in, we will need for transpose;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc transpose data = temp_means out = want;&lt;/P&gt;&lt;DIV&gt;&lt;STRONG&gt;id sex; *this will keep the value of your class variable as column names;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;good luck!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anca.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 14:07:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Means-Getting-the-same-information-in-both-html-and-data/m-p/88147#M4312</guid>
      <dc:creator>AncaTilea</dc:creator>
      <dc:date>2013-01-28T14:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means: Getting the same information in both html and data set outputs</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Means-Getting-the-same-information-in-both-html-and-data/m-p/88148#M4313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thank EJ. That was very helpful!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I knew it had to be that easy!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ian.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 15:40:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Means-Getting-the-same-information-in-both-html-and-data/m-p/88148#M4313</guid>
      <dc:creator>iank131</dc:creator>
      <dc:date>2013-01-28T15:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means: Getting the same information in both html and data set outputs</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Means-Getting-the-same-information-in-both-html-and-data/m-p/88149#M4314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much Anca!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I can get both html and the data set with the same information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ian.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 15:41:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Means-Getting-the-same-information-in-both-html-and-data/m-p/88149#M4314</guid>
      <dc:creator>iank131</dc:creator>
      <dc:date>2013-01-28T15:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means: Getting the same information in both html and data set outputs</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Means-Getting-the-same-information-in-both-html-and-data/m-p/88150#M4315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great suggestion ODS OUTPUT ... I use it all the time dont know why I didnt think about that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 17:56:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Means-Getting-the-same-information-in-both-html-and-data/m-p/88150#M4315</guid>
      <dc:creator>esjackso</dc:creator>
      <dc:date>2013-01-28T17:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means: Getting the same information in both html and data set outputs</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Means-Getting-the-same-information-in-both-html-and-data/m-p/88151#M4316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have SAS 9.3 and above check out the STACKODS option in proc means &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 19:13:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Means-Getting-the-same-information-in-both-html-and-data/m-p/88151#M4316</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-01-28T19:13:26Z</dc:date>
    </item>
  </channel>
</rss>

