<?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: descriptive statistics in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277852#M55851</link>
    <description>&lt;P&gt;Before any using of BY statement, the data set has to be sorted:&lt;/P&gt;&lt;P&gt;Proc sort data=your.data;&lt;/P&gt;&lt;P&gt;by country;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jun 2016 10:54:38 GMT</pubDate>
    <dc:creator>Klara</dc:creator>
    <dc:date>2016-06-16T10:54:38Z</dc:date>
    <item>
      <title>descriptive statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277816#M55831</link>
      <description>&lt;P&gt;I want to make following table. excel file is attached with this . fam is 0 for non-family firms while fam is 0 for family firms.&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;Country JPN&lt;/DIV&gt;
&lt;DIV&gt;&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;&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;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Book deb ratio&lt;/DIV&gt;
&lt;DIV&gt;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;N&amp;nbsp; &amp;nbsp; mean&amp;nbsp;&amp;nbsp; median&amp;nbsp; max&amp;nbsp; min&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;Family firms&lt;/DIV&gt;
&lt;DIV&gt;Non-family firms&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Country Kor&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;Book deb ratio&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;N&amp;nbsp; &amp;nbsp; mean&amp;nbsp;&amp;nbsp; median&amp;nbsp; max&amp;nbsp; min&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;Family firms&lt;/DIV&gt;
&lt;DIV&gt;Non-family firms&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 16 Jun 2016 08:59:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277816#M55831</guid>
      <dc:creator>Jahanzaib</dc:creator>
      <dc:date>2016-06-16T08:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: descriptive statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277818#M55832</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;(added my own datastep, as I never open Office files from the web)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input country $ fam bdr;
cards;
JPN 0 5
JPN 0 6
JPN 1 3
JPN 1 4
KOR 0 3
KOR 0 2
KOR 1 4
KOR 1 5
;
run;

proc summary data=have;
var bdr;
class fam;
by country;
output
  out=want (
    drop=_type_
    rename=(_freq_=N)
    where=(fam ne .)
  )
  mean(bdr)=mean
  median(bdr)=median
  max(bdr)=max
  min(bdr)=min
;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jun 2016 09:14:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277818#M55832</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-16T09:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: descriptive statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277823#M55834</link>
      <description>&lt;P&gt;Thanks for your reply but it do not explain the things that i want. because it only work for the mentioned countries and inclue only 5 observations. anyone here who can open my excel file and explain in more detail?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 09:28:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277823#M55834</guid>
      <dc:creator>Jahanzaib</dc:creator>
      <dc:date>2016-06-16T09:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: descriptive statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277825#M55835</link>
      <description>&lt;P&gt;Post your data in a more sensible and less dangerous format (.csv, for instance).&lt;/P&gt;
&lt;P&gt;Or import your excel data into SAS and then create a sample dataset, as described in&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_self"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 09:35:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277825#M55835</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-16T09:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: descriptive statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277830#M55838</link>
      <description>&lt;P&gt;Maybe this...?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc sort data=your.data;&lt;/P&gt;&lt;P&gt;by country;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc means data=your.data &amp;nbsp;n mean median max min;&lt;/P&gt;&lt;P&gt;var ...;&lt;/P&gt;&lt;P&gt;class fam;&lt;/P&gt;&lt;P&gt;by country;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 09:53:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277830#M55838</guid>
      <dc:creator>Klara</dc:creator>
      <dc:date>2016-06-16T09:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: descriptive statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277831#M55839</link>
      <description>&lt;P&gt;It is easy for proc tabulate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile='/folders/myfolders/22.xls' out=have replace dbms=xls;run;
data temp;
 set have;
 length F $ 20;
 if Fam=0 then F='Non-family firms';
  else if Fam=1 then F='Family firms';
run;
options nobyline;
title j=l "Country #byval1";
proc tabulate data=temp;
by count;
var book_debt_ratio;
class F;
table F=' ',book_debt_ratio*(N    mean   median  max  min);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jun 2016 09:53:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277831#M55839</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-16T09:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: descriptive statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277844#M55846</link>
      <description>&lt;P&gt;when i put the complete data which contain 9 countries than it comes up with this error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: Data set WORK.TEMP is not sorted in ascending sequence. The current BY group has Count =&lt;BR /&gt;JPN and the next BY group has Count = HKG.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 10:25:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277844#M55846</guid>
      <dc:creator>Jahanzaib</dc:creator>
      <dc:date>2016-06-16T10:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: descriptive statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277845#M55847</link>
      <description>&lt;P&gt;Then sort by country before the summary/means:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=temp;
by country;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jun 2016 10:31:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277845#M55847</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-16T10:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: descriptive statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277852#M55851</link>
      <description>&lt;P&gt;Before any using of BY statement, the data set has to be sorted:&lt;/P&gt;&lt;P&gt;Proc sort data=your.data;&lt;/P&gt;&lt;P&gt;by country;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 10:54:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277852#M55851</guid>
      <dc:creator>Klara</dc:creator>
      <dc:date>2016-06-16T10:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: descriptive statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277869#M55859</link>
      <description>&lt;P&gt;I have got my results in the form 10.02 i want to get the results upto 4 points. can you describe how can i take this upto four point like 10.02 to 10.0214&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 12:19:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277869#M55859</guid>
      <dc:creator>Jahanzaib</dc:creator>
      <dc:date>2016-06-16T12:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: descriptive statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277874#M55862</link>
      <description>&lt;P&gt;Add a format to the variable, like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=have;
var bdr;
class fam;
by country;
attrib bdr format=10.4;
output
  out=want (
    drop=_type_
    rename=(_freq_=N)
    where=(fam ne .)
  )
  mean(bdr)=mean
  median(bdr)=median
  max(bdr)=max
  min(bdr)=min
;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The format will be inherited by the statistics.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 12:29:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277874#M55862</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-16T12:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: descriptive statistics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277973#M55887</link>
      <description>&lt;P&gt;I want to merge two data's. in both excel files the company name are same i have data for 14 years so i want to merge two files in a sense that company name and data for a particular year apear togather. &amp;nbsp;for example i have stock data for 100 companies for 14 years is in one file and total assets data for those 100 companies for 14 years is another file. how can i merge these two files. &amp;nbsp;both the files contain same companies names and same years. Thanks in anticipation.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 17:21:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/descriptive-statistics/m-p/277973#M55887</guid>
      <dc:creator>Jahanzaib</dc:creator>
      <dc:date>2016-06-16T17:21:04Z</dc:date>
    </item>
  </channel>
</rss>

