<?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 and Proc Univariate Differences in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226431#M54037</link>
    <description>&lt;P&gt;Yes.&amp;nbsp;if you wanted to rename _VAR_ to VARIABLE you would &amp;nbsp;include it in the list of old=new names in the RENAME option on the output dataset name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC UNIVARIATE data=sashelp.class
  OUTTABLE=want
   (
     RENAME=(_VAR_ = VARIABLE
            )
   )
 ;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 19 Sep 2015 22:23:47 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2015-09-19T22:23:47Z</dc:date>
    <item>
      <title>Proc Means and Proc Univariate Differences</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226387#M54025</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder, do proc means procedure's and proc univariate procedure's functions calculate the same values. Firstly i wrote the procedure with using proc means now i want to try it with proc univariate but i got error i think their syntax is different. How can i write proc means code &amp;nbsp;as proc univariate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=WORK.sample STACKODS
FW=12
     PRINTALLTYPES
     CHARTYPE
     QMETHOD=OS
     VARDEF=DF 
           MEAN 
           STD 
           MODE    
           P10 
           P90 ;
var Q:;
ods output summary=stacked;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc univariate data=WORK.sample STACKODS
FW=12
     PRINTALLTYPES
     CHARTYPE
     QMETHOD=OS
     VARDEF=DF 
           MEAN 
           STD 
           MODE    
           P10 
           P90 ;
var Q:;
ods output summary=stacked;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2015 20:16:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226387#M54025</guid>
      <dc:creator>turcay</dc:creator>
      <dc:date>2015-09-18T20:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means and Proc Univariate Differences</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226390#M54026</link>
      <description>&lt;P&gt;Please look in the online help as there are significant differences in syntax. As a hint see what you get with&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc univariate data=WORK.sample ;
var Q:;

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Printed appearance of decimal values may appear different due to different default widths of values displayed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2015 20:27:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226390#M54026</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-09-18T20:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means and Proc Univariate Differences</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226395#M54028</link>
      <description>&lt;P&gt;Yes of course tried the statement that you wrote but ı try to get same output like below.&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/234i523B2D183A11A620/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="uni.png" title="uni.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2015 20:50:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226395#M54028</guid>
      <dc:creator>turcay</dc:creator>
      <dc:date>2015-09-18T20:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means and Proc Univariate Differences</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226399#M54029</link>
      <description>I don't think you easily can. Proc Univariate does not support the same output format in general. What do you want from proc univariate that you can't get in proc means?</description>
      <pubDate>Fri, 18 Sep 2015 21:44:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226399#M54029</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-09-18T21:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means and Proc Univariate Differences</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226403#M54031</link>
      <description>&lt;P&gt;Okay then. Some of my friends said to me,univariate can generate different values but he is not sure, as you said there is no differences. I wanted to be sure. Thanks. Well, &amp;nbsp;how can we generate same output with univariate ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2015 23:24:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226403#M54031</guid>
      <dc:creator>turcay</dc:creator>
      <dc:date>2015-09-18T23:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means and Proc Univariate Differences</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226404#M54032</link>
      <description>You can use the OUTPUT statement to generate the dataset and then you'd have to transpose it using proc transpose.&lt;BR /&gt;&lt;BR /&gt;Or you can capture several of the ODS tables, merge them and/or transpose.&lt;BR /&gt;&lt;BR /&gt;The documentation is fairly clear on how to get output from PROC UNIVARIATE, unlike proc means you do need to explicitly list variable names as well.&lt;BR /&gt;&lt;BR /&gt;Proc univariate will generate same values for the same statistics, but it will also generate specific percentiles points which is when I generally use it over proc means.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/procstat/63104/HTML/default/viewer.htm#procstat_univariate_sect062.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/procstat/63104/HTML/default/viewer.htm#procstat_univariate_sect062.htm&lt;/A&gt;</description>
      <pubDate>Sat, 19 Sep 2015 00:29:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226404#M54032</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-09-19T00:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means and Proc Univariate Differences</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226411#M54033</link>
      <description>&lt;P&gt;You can use the following code to get the same layout as proc means,but you can't customize it .&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc univariate data=sashelp.class outtable=want;
var weight;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 19 Sep 2015 04:14:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226411#M54033</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-09-19T04:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means and Proc Univariate Differences</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226416#M54034</link>
      <description>&lt;P&gt;Thank you , i'm so close to&amp;nbsp;do it. Actually,&amp;nbsp;at the first code i made it but i didn't bring the columns which i want it. Second code i got the columns but just for one Q. Have you got an any idea ?.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;bdata sample;

length Q1 8 Q2 8 Q3 8 Q4 8 Q5 8 Q6 8;

infile datalines  missover dlm=',';

input Q1 Q2 Q3 Q4 Q5 Q6;

datalines;

80,90,70,90,80,70

90,95,99,40,50,90

0,90,99,89,87,89

77,88,0,45,78,89

0,0,0,58,90,89

-10,-10,-30,89,90,79

-20,-45,-80,89,90,50

-49,-67,-80,70,89,80

;

proc univariate data=work.sample outtable=sample;

   var Q:;

run;

proc univariate data=work.sample2;

   var _VAR_ _MEAN_  _STD_ _P10_ _P90_ _MODE_;

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc univariate data=work.sample;

   var Q:;

   output out=univariateTable

mean=Mean

Mode=Mode

P10=P10

P90=P90

STDDEV=STDDEV;

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Sep 2015 10:31:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226416#M54034</guid>
      <dc:creator>turcay</dc:creator>
      <dc:date>2015-09-19T10:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means and Proc Univariate Differences</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226418#M54035</link>
      <description>&lt;P&gt;The table (want) generated by OUTTABLE= have already contain these statistic estimator.&lt;/P&gt;&lt;P&gt;You just need KEEP it .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
length Q1 8 Q2 8 Q3 8 Q4 8 Q5 8 Q6 8;
infile datalines  missover dlm=',';
input Q1 Q2 Q3 Q4 Q5 Q6;
datalines;
80,90,70,90,80,70
90,95,99,40,50,90
0,90,99,89,87,89
77,88,0,45,78,89
0,0,0,58,90,89
-10,-10,-30,89,90,79
-20,-45,-80,89,90,50
-49,-67,-80,70,89,80
;

proc univariate data=work.sample outtable=want(keep=_var_ _mean_ _std_ _mode_ _p10_ _p90_);
   var Q:;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 19 Sep 2015 11:05:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226418#M54035</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-09-19T11:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means and Proc Univariate Differences</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226430#M54036</link>
      <description>&lt;P&gt;Yes I made it, is it possible to change columns name ? I tried but did not succeed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc univariate data=work.sample outtable=want(keep=_var_ _mean_ _std_ _mode_ _p10_ _p90_)
;
label _VAR_=Variable;
   var Q:;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 19 Sep 2015 19:34:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226430#M54036</guid>
      <dc:creator>turcay</dc:creator>
      <dc:date>2015-09-19T19:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means and Proc Univariate Differences</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226431#M54037</link>
      <description>&lt;P&gt;Yes.&amp;nbsp;if you wanted to rename _VAR_ to VARIABLE you would &amp;nbsp;include it in the list of old=new names in the RENAME option on the output dataset name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC UNIVARIATE data=sashelp.class
  OUTTABLE=want
   (
     RENAME=(_VAR_ = VARIABLE
            )
   )
 ;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Sep 2015 22:23:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226431#M54037</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-09-19T22:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means and Proc Univariate Differences</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226432#M54038</link>
      <description>&lt;P&gt;Yes it works tahnk you. But this time i couldn't &amp;nbsp;use drop or keep statement ?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC UNIVARIATE data=WORK.sample
  OUTTABLE=want (keep=_var_)
  (RENAME=(_VAR_ = VARIABLE));
  var Q:;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Sep 2015 22:47:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226432#M54038</guid>
      <dc:creator>turcay</dc:creator>
      <dc:date>2015-09-19T22:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means and Proc Univariate Differences</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226433#M54039</link>
      <description>&lt;P&gt;You have an extra close parenthesis. Remove the right parenthesis after your list of variables to keep. Dataset options are enclosed with () following the dataset name. &amp;nbsp; They are space delimited and in the form of option=value. &amp;nbsp;Some like the RENAME= option require their own set of () since the values contain equal signs. Formatting the code can make it easier to insure that they are properly nested.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;mydsn
(keep= x y x 
 rename=
    (x=a
     y=b
    ) 
 obs=10 
 firstobs=3 
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Sep 2015 23:02:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226433#M54039</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-09-19T23:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Means and Proc Univariate Differences</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226439#M54040</link>
      <description>&lt;P&gt;Yes. That's it. Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC UNIVARIATE data=WORK.sample OUTTABLE=want
 (keep=_var_ _mean_ _std_ _mode_ RENAME=(
_VAR_=VARIABLE
_MEAN_=MEAN
_STD_=STDDEV
_MODE_=MODE
));
  var Q:;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 20 Sep 2015 08:23:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Means-and-Proc-Univariate-Differences/m-p/226439#M54040</guid>
      <dc:creator>turcay</dc:creator>
      <dc:date>2015-09-20T08:23:36Z</dc:date>
    </item>
  </channel>
</rss>

