<?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 Design the summary statistic Table aesthetically in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Design-the-summary-statistic-Table-aesthetically/m-p/717829#M222057</link>
    <description>&lt;P&gt;Hi SAS Users,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have three dataset called "&lt;STRONG&gt;winsorize_sample&lt;/STRONG&gt;", "&lt;STRONG&gt;treatment_sample&lt;/STRONG&gt;", and "&lt;STRONG&gt;control_sample&lt;/STRONG&gt;". Now I want to build a Table including the summary statistic of all numeric variables of these three datasets together.&lt;/P&gt;
&lt;P&gt;In particular, these three datasets haves the same variables, among them, &lt;STRONG&gt;Type, Ename, geogn, year, acc_sta&lt;/STRONG&gt; are character variables while &lt;STRONG&gt;acc_pay, ACC_PAY_TURN, &lt;/STRONG&gt;and &lt;STRONG&gt;LAGS18&lt;/STRONG&gt; are numeric variables. For all three datasets, I want to &lt;STRONG&gt;summarize all numeric variables except LAGS18&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;I also attached the sample of these three datasets in this post.&lt;/P&gt;
&lt;P&gt;A quick description of the dataset&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;TYPE	ENAME	    GEOGN	    YEAR	acc_pay	ACC_PAY_TUR	    ACC_STA	         LAGS18
134495	DYCASA 'B'	ARGENTINA	1994	7445	.	            Local standards	 .
134495	DYCASA 'B'	ARGENTINA	1995	10099	8.7216142271	                 .
134495	DYCASA 'B'	ARGENTINA	1996	6277	8.0189301417	Local standards  2.57
134495	DYCASA 'B'	ARGENTINA	1997	8419	11.732035928	Local standards	 2.01
134495	DYCASA 'B'	ARGENTINA	1998	15387	7.5126438713	Local standards  5.91
134495	DYCASA 'B'	ARGENTINA	1999	18653	4.833666275  	Local standards	 3.87&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now, I want to have a summary statistic Table like below( I make it by using Excel), can you please let me know how to make a Table like that in SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="My97_1-1612865084544.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54488i9BF09A20D8656714/image-size/large?v=v2&amp;amp;px=999" role="button" title="My97_1-1612865084544.png" alt="My97_1-1612865084544.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks in advance and warm regards!&lt;/P&gt;</description>
    <pubDate>Tue, 09 Feb 2021 10:22:48 GMT</pubDate>
    <dc:creator>Phil_NZ</dc:creator>
    <dc:date>2021-02-09T10:22:48Z</dc:date>
    <item>
      <title>Design the summary statistic Table aesthetically</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Design-the-summary-statistic-Table-aesthetically/m-p/717829#M222057</link>
      <description>&lt;P&gt;Hi SAS Users,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have three dataset called "&lt;STRONG&gt;winsorize_sample&lt;/STRONG&gt;", "&lt;STRONG&gt;treatment_sample&lt;/STRONG&gt;", and "&lt;STRONG&gt;control_sample&lt;/STRONG&gt;". Now I want to build a Table including the summary statistic of all numeric variables of these three datasets together.&lt;/P&gt;
&lt;P&gt;In particular, these three datasets haves the same variables, among them, &lt;STRONG&gt;Type, Ename, geogn, year, acc_sta&lt;/STRONG&gt; are character variables while &lt;STRONG&gt;acc_pay, ACC_PAY_TURN, &lt;/STRONG&gt;and &lt;STRONG&gt;LAGS18&lt;/STRONG&gt; are numeric variables. For all three datasets, I want to &lt;STRONG&gt;summarize all numeric variables except LAGS18&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;I also attached the sample of these three datasets in this post.&lt;/P&gt;
&lt;P&gt;A quick description of the dataset&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;TYPE	ENAME	    GEOGN	    YEAR	acc_pay	ACC_PAY_TUR	    ACC_STA	         LAGS18
134495	DYCASA 'B'	ARGENTINA	1994	7445	.	            Local standards	 .
134495	DYCASA 'B'	ARGENTINA	1995	10099	8.7216142271	                 .
134495	DYCASA 'B'	ARGENTINA	1996	6277	8.0189301417	Local standards  2.57
134495	DYCASA 'B'	ARGENTINA	1997	8419	11.732035928	Local standards	 2.01
134495	DYCASA 'B'	ARGENTINA	1998	15387	7.5126438713	Local standards  5.91
134495	DYCASA 'B'	ARGENTINA	1999	18653	4.833666275  	Local standards	 3.87&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now, I want to have a summary statistic Table like below( I make it by using Excel), can you please let me know how to make a Table like that in SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="My97_1-1612865084544.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54488i9BF09A20D8656714/image-size/large?v=v2&amp;amp;px=999" role="button" title="My97_1-1612865084544.png" alt="My97_1-1612865084544.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks in advance and warm regards!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 10:22:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Design-the-summary-statistic-Table-aesthetically/m-p/717829#M222057</guid>
      <dc:creator>Phil_NZ</dc:creator>
      <dc:date>2021-02-09T10:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Design the summary statistic Table aesthetically</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Design-the-summary-statistic-Table-aesthetically/m-p/717849#M222067</link>
      <description>&lt;P&gt;First step will be to concatenate the 3 datasets and adding the dataset name in a variable as shown in next example code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a; x=1;
data b; x=2;
data c; x=3; run;
data all;
 set a b c :indsname=dsn;
  length dsname $32;
  dsname = scan(dsn,2);
  keep x dsname; /* adapt to keep all and only required variables to the report */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Step-2 will be to run PROC MEANS and create a summary table&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;by&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;dsname&lt;/STRONG&gt; (the new added variable) &lt;STRONG&gt;ACC_PAY ACC_PAY_TURN;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;VAR&amp;nbsp;&lt;/STRONG&gt;&amp;lt;numeric analytic variable/s&amp;gt;;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;OUTPUT&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;out=&lt;/STRONG&gt;&amp;lt;summed dataset name&amp;gt; &amp;lt;statistics required&amp;gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Step-3 will be to transpose the table getting the statistic variable name into a new variable&lt;/P&gt;
&lt;P&gt;that can be renamed or assigned as "Summary" for the summary column in the report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Last step - use PROC TABULATE to create the report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try to create the code and run it. If you have any issue post the code and the log.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 11:37:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Design-the-summary-statistic-Table-aesthetically/m-p/717849#M222067</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2021-02-09T11:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Design the summary statistic Table aesthetically</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Design-the-summary-statistic-Table-aesthetically/m-p/717942#M222102</link>
      <description>1. Either summarize each data set separately and merge the results&lt;BR /&gt;2. Combine the datasets together, use PROC TRANSPOSE to restructure the data so you have one variable for winsorized, treatment and control values.  Then use PROC TABULATE to create a nice formatted table.</description>
      <pubDate>Tue, 09 Feb 2021 16:32:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Design-the-summary-statistic-Table-aesthetically/m-p/717942#M222102</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-02-09T16:32:26Z</dc:date>
    </item>
  </channel>
</rss>

