<?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: How do i get the summary statistics of a dataset for all variables column wise in a dataset in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420107#M22105</link>
    <description>&lt;P&gt;What does your current PROC SQL code look like?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, the VTYPE function will return the type of the variable as you requested in your original post &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Dec 2017 13:42:38 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2017-12-11T13:42:38Z</dc:date>
    <item>
      <title>How do i get the summary statistics of a dataset for all variables column wise in a dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420096#M22101</link>
      <description>&lt;P&gt;How do I output the summary values of a dataset column wise as below?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ColName&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;type&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;n&amp;nbsp; &amp;nbsp; &amp;nbsp;NAs&amp;nbsp; NonNAs UniqueValues&lt;/STRONG&gt;&lt;BR /&gt;SBL_BB.Loans.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; character&amp;nbsp; 398&amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 398&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&lt;BR /&gt;Unique.Id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; integer&amp;nbsp; &amp;nbsp; &amp;nbsp; 398&amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 398&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NA&lt;BR /&gt;Scenario&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;character&amp;nbsp; 398&amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 398&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;BR /&gt;Entity&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; character&amp;nbsp; 398&amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 398&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&lt;BR /&gt;Business&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; character&amp;nbsp; 398&amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 398&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9&lt;BR /&gt;Issuer Category&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;character&amp;nbsp; 398&amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 398&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use Proc SQL for the same but am unable to understand how to get the 'type' of each variable using PROC SQL.&lt;/P&gt;&lt;P&gt;Can anyone please help?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 13:18:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420096#M22101</guid>
      <dc:creator>subhrajitcet0</dc:creator>
      <dc:date>2017-12-11T13:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the summary statistics of a dataset for all variables column wise in a dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420098#M22102</link>
      <description>&lt;P&gt;Explain what "summary values" you are talking about.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Show us your PROC SQL code.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 13:22:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420098#M22102</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-12-11T13:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the summary statistics of a dataset for all variables column wise in a dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420104#M22103</link>
      <description>&lt;P&gt;The VTYPE function gives you the type of the variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, it returns N or C (Numeric/Character) and does not return integer as this is not a variable type.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 13:34:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420104#M22103</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-12-11T13:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the summary statistics of a dataset for all variables column wise in a dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420106#M22104</link>
      <description>&lt;P&gt;Hello PaideMiller,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i require is the variable type, no of non missing observations, no of missing observations and no of unique values for each variable in a dataset.&lt;/P&gt;&lt;P&gt;All the above options should be printed against&amp;nbsp;each variable with the variable names in the first column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 13:39:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420106#M22104</guid>
      <dc:creator>subhrajitcet0</dc:creator>
      <dc:date>2017-12-11T13:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the summary statistics of a dataset for all variables column wise in a dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420107#M22105</link>
      <description>&lt;P&gt;What does your current PROC SQL code look like?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, the VTYPE function will return the type of the variable as you requested in your original post &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 13:42:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420107#M22105</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-12-11T13:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the summary statistics of a dataset for all variables column wise in a dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420110#M22106</link>
      <description>&lt;P&gt;Use proc freq, that is the purpose of the procedure:&lt;/P&gt;
&lt;PRE&gt;proc freq data=&amp;lt;your dataset&amp;gt;;
  tables _all_ / nocum nopercent;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Dec 2017 13:45:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420110#M22106</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-12-11T13:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the summary statistics of a dataset for all variables column wise in a dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420113#M22107</link>
      <description>&lt;P&gt;Thanks for your response RW9, but PROC FREQ gives me a detailed frequency of each variable's value rather than giving me a result on the different variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used the code:&lt;/P&gt;&lt;P&gt;ods exclude all;&lt;/P&gt;&lt;P&gt;proc means data=sashelp.cars N Nmiss stackodsoutput;&lt;/P&gt;&lt;P&gt;ods output summary=MeansSummary;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;ods exclude none;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the output as:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Variable&lt;/TD&gt;&lt;TD&gt;Label&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;TD&gt;Nmiss&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;MSRP&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;428&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Invoice&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;428&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;EngineSize&lt;/TD&gt;&lt;TD&gt;Engine Size (L)&lt;/TD&gt;&lt;TD&gt;428&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Cylinders&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;426&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Horsepower&lt;/TD&gt;&lt;TD&gt;428&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;MPG_City&lt;/TD&gt;&lt;TD&gt;MPG (City)&lt;/TD&gt;&lt;TD&gt;428&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;MPG_Highway&lt;/TD&gt;&lt;TD&gt;MPG (Highway)&lt;/TD&gt;&lt;TD&gt;428&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Weight&lt;/TD&gt;&lt;TD&gt;Weight (LBS)&lt;/TD&gt;&lt;TD&gt;428&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Wheelbase&lt;/TD&gt;&lt;TD&gt;Wheelbase (IN)&lt;/TD&gt;&lt;TD&gt;428&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Length&lt;/TD&gt;&lt;TD&gt;Length (IN)&lt;/TD&gt;&lt;TD&gt;428&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Along with N and Nmiss I want the variable type and no of unique values for each Variable in the dataset. How do I get the variable type and no of unique values in PROC MEANS?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 13:59:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420113#M22107</guid>
      <dc:creator>subhrajitcet0</dc:creator>
      <dc:date>2017-12-11T13:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the summary statistics of a dataset for all variables column wise in a dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420120#M22109</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks for your response RW9, but PROC FREQ gives me a detailed frequency of each variable's value rather than giving me a result on the different variables.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Then it is a simple matter for you to count the number of values of each variable from the output of PROC FREQ; this can be done using the OUTPUT option of PROC FREQ, followed by another PROC MEANS or PROC FREQ.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 14:33:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420120#M22109</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-12-11T14:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the summary statistics of a dataset for all variables column wise in a dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420125#M22110</link>
      <description>&lt;P&gt;Ah, bit more complex then, maybe something like:&lt;/P&gt;
&lt;PRE&gt;proc sql;
  create table WANT (VAR char(20),TYPE char(20),N num,NMISS num,NUNIQUE num);
quit;

data _null_;
  set sashelp.vcolumn (where=(libname="SASHELP" and memname="CARS"));
  call execute(cat('proc sql; insert into WANT set VAR="',strip(name),'",TYPE="',strip(type),
                    '",NMISS=(select count(distinct ',strip(name),') from SASHELP.CARS where missing(',strip(name),')),
                     NUNIQUE=(select count(distinct ',strip(name),') from SASHELP.CARS); quit;'));
run;

proc sql;
  update WANT
  set N=(select NOBS from SASHELP.VTABLE where LIBNAME="SASHELP" and MEMNAME="CARS");
quit;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Dec 2017 14:39:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420125#M22110</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-12-11T14:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do i get the summary statistics of a dataset for all variables column wise in a dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420383#M22122</link>
      <description>&lt;P&gt;That's perfect RW9.&lt;/P&gt;&lt;P&gt;This is the exact solution I wanted. Thanks a lot.&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;</description>
      <pubDate>Tue, 12 Dec 2017 08:06:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-i-get-the-summary-statistics-of-a-dataset-for-all/m-p/420383#M22122</guid>
      <dc:creator>subhrajitcet0</dc:creator>
      <dc:date>2017-12-12T08:06:56Z</dc:date>
    </item>
  </channel>
</rss>

