<?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: Using outpt statement in proc means in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Using-outpt-statement-in-proc-means/m-p/740868#M36013</link>
    <description>&lt;P&gt;You have to give it more names.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=stack nway ;
  class burstday;
  var Dalc1 Dalc2; 
  output out=minmax n=n1 n2 min=min1 min2 max=max1 max2; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or let it make up the names by using the autoname option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  output out=minmax n= min= max= / autoname ; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note: If you aren't making any output just use the alias SUMMARY for the proc. NOPRINT is the default for PROC SUMMARY.&lt;/P&gt;
&lt;P&gt;Note: NWAY is an optional keyword on the PROC statement, not a statement of its own like WAYS.&lt;/P&gt;</description>
    <pubDate>Wed, 12 May 2021 17:03:07 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2021-05-12T17:03:07Z</dc:date>
    <item>
      <title>Using outpt statement in proc means</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-outpt-statement-in-proc-means/m-p/740812#M36009</link>
      <description>&lt;P&gt;I'm checking data and i want to look at min and max values for a set of variables. The dataset consists of an id variable, burstday, a person id, studyid, and the set of variables. Each person id will appear burstday times, so a long format repeated measures structure. I understand how to do the basic analysis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;proc means data=stack noprint n min max maxdec=0; class burstday; var Dalc1 Dalc2; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to run the output to a datafile.I began with this:&lt;/P&gt;&lt;P&gt;proc means data=stack noprint n min max maxdec=0; class burstday;&lt;BR /&gt;var Dalc1 Dalc2; output out=minmax n=valn min=minval max=maxval; run;&lt;/P&gt;&lt;P&gt;I get the n, min, and max for each value of burstday (plus what may be the total sample value and which i don't care about) for an unidentified variable but not both named variables.&lt;/P&gt;&lt;P&gt;Q1: what do i do to get the summary stats for both, i.e., all named, variables?&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;/P&gt;&lt;P&gt;&amp;nbsp;&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;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 14:57:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-outpt-statement-in-proc-means/m-p/740812#M36009</guid>
      <dc:creator>emaguin</dc:creator>
      <dc:date>2021-05-12T14:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using outpt statement in proc means</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-outpt-statement-in-proc-means/m-p/740814#M36010</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select none;

proc means data=stack n min max maxdec=0 NWAY STACKODS; 
class burstday;
var Dalc1 Dalc2; 
output out=minmax1  n= min= max= / autoname; 
ods output summary = minmax2;
run;

ods select all;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Two methods above.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look into NWAY and STACKODS options or here's some instructions and explanations on how to capture output that is shown. &lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/sastraining/2017/03/31/capturing-output-from-any-procedure-with-an-ods-output-statement/" target="_blank"&gt;https://blogs.sas.com/content/sastraining/2017/03/31/capturing-output-from-any-procedure-with-an-ods-output-statement/&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/273054"&gt;@emaguin&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I'm checking data and i want to look at min and max values for a set of variables. The dataset consists of an id variable, burstday, a person id, studyid, and the set of variables. Each person id will appear burstday times, so a long format repeated measures structure. I understand how to do the basic analysis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;proc means data=stack noprint n min max maxdec=0; class burstday; var Dalc1 Dalc2; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to run the output to a datafile.I began with this:&lt;/P&gt;
&lt;P&gt;proc means data=stack noprint n min max maxdec=0; class burstday;&lt;BR /&gt;var Dalc1 Dalc2; output out=minmax n=valn min=minval max=maxval; run;&lt;/P&gt;
&lt;P&gt;I get the n, min, and max for each value of burstday (plus what may be the total sample value and which i don't care about) for an unidentified variable but not both named variables.&lt;/P&gt;
&lt;P&gt;Q1: what do i do to get the summary stats for both, i.e., all named, variables?&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;/P&gt;
&lt;P&gt;&amp;nbsp;&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;/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>Wed, 12 May 2021 15:03:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-outpt-statement-in-proc-means/m-p/740814#M36010</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-05-12T15:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using outpt statement in proc means</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-outpt-statement-in-proc-means/m-p/740844#M36011</link>
      <description>&lt;P&gt;Thank you, Reeza. I don't find "NWAY" in the proc means documentation (i find WAYS) and i don't find it in the documentation at all when i search for it. It looks like STACKODS provides desired data structure. I don't know what the ODS lines are for. I just put them in and ran the sequence and nothing seems different.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 16:04:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-outpt-statement-in-proc-means/m-p/740844#M36011</guid>
      <dc:creator>emaguin</dc:creator>
      <dc:date>2021-05-12T16:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using outpt statement in proc means</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-outpt-statement-in-proc-means/m-p/740851#M36012</link>
      <description>There are two outputs are generated, minmax1 and minmax2. You'll notice that the layout of the files are very different. &lt;BR /&gt;&lt;BR /&gt;NWAY is documented under the PROC MEAN statement as it's an option to control the output. &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n1qnc9bddfvhzqn105kqitnf29cp.htm#n10z5tfgi3j0h9n19pq7bbgn9tve" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n1qnc9bddfvhzqn105kqitnf29cp.htm#n10z5tfgi3j0h9n19pq7bbgn9tve&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;This example illustrates what STACKODS does:&lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p17h6q7ygvkl1sn13qzf947dundi.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p17h6q7ygvkl1sn13qzf947dundi.htm&lt;/A&gt;</description>
      <pubDate>Wed, 12 May 2021 16:23:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-outpt-statement-in-proc-means/m-p/740851#M36012</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-05-12T16:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using outpt statement in proc means</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-outpt-statement-in-proc-means/m-p/740868#M36013</link>
      <description>&lt;P&gt;You have to give it more names.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=stack nway ;
  class burstday;
  var Dalc1 Dalc2; 
  output out=minmax n=n1 n2 min=min1 min2 max=max1 max2; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or let it make up the names by using the autoname option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  output out=minmax n= min= max= / autoname ; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note: If you aren't making any output just use the alias SUMMARY for the proc. NOPRINT is the default for PROC SUMMARY.&lt;/P&gt;
&lt;P&gt;Note: NWAY is an optional keyword on the PROC statement, not a statement of its own like WAYS.&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 17:03:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-outpt-statement-in-proc-means/m-p/740868#M36013</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-05-12T17:03:07Z</dc:date>
    </item>
  </channel>
</rss>

