<?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 Estimate data for histogram without the Histogram Statement in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Estimate-data-for-histogram-without-the-Histogram-Statement/m-p/213768#M52717</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use data from the Luxembourg Income Study online database. It is a database of household surveys from different countries. This database has a user interface through which I can analyze the data using SAS, but not directly access or see the data. I cannot create plots, and I cannot print the raw data. For example, the following frequency statement gets rejected because it is considered printing of raw data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*** dhi = disposable household income, hpopwgt = inflated household weight ***;&lt;/P&gt;&lt;P&gt;PROC FREQ DATA=&amp;amp;it04h;&lt;/P&gt;&lt;P&gt;TABLES dhi; &lt;/P&gt;&lt;P&gt;WEIGHT hpopwgt;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to create a histogram of the income distribution. I cannot use the histogram statement in proc univariate because plots are not allowed. I only need the table that gives the bin midpoint and the observed percent. I am looking for a different piece of code that would give me the same results that the code below gives (apart from the plot obviously):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA Italy04; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET &amp;amp;it04h;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DO i=1 TO hpopwgt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OUTPUT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC UNIVARIATE DATA=Italy04;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAR dhi;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HISTOGRAM dhi / MIDPERCENTS NMIDPOINTS=100;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to SAS and I very much appreciate your help &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;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 May 2015 01:50:35 GMT</pubDate>
    <dc:creator>ebardaka5</dc:creator>
    <dc:date>2015-05-13T01:50:35Z</dc:date>
    <item>
      <title>Estimate data for histogram without the Histogram Statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Estimate-data-for-histogram-without-the-Histogram-Statement/m-p/213768#M52717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use data from the Luxembourg Income Study online database. It is a database of household surveys from different countries. This database has a user interface through which I can analyze the data using SAS, but not directly access or see the data. I cannot create plots, and I cannot print the raw data. For example, the following frequency statement gets rejected because it is considered printing of raw data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*** dhi = disposable household income, hpopwgt = inflated household weight ***;&lt;/P&gt;&lt;P&gt;PROC FREQ DATA=&amp;amp;it04h;&lt;/P&gt;&lt;P&gt;TABLES dhi; &lt;/P&gt;&lt;P&gt;WEIGHT hpopwgt;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to create a histogram of the income distribution. I cannot use the histogram statement in proc univariate because plots are not allowed. I only need the table that gives the bin midpoint and the observed percent. I am looking for a different piece of code that would give me the same results that the code below gives (apart from the plot obviously):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA Italy04; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET &amp;amp;it04h;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DO i=1 TO hpopwgt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OUTPUT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC UNIVARIATE DATA=Italy04;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAR dhi;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HISTOGRAM dhi / MIDPERCENTS NMIDPOINTS=100;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to SAS and I very much appreciate your help &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;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 01:50:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Estimate-data-for-histogram-without-the-Histogram-Statement/m-p/213768#M52717</guid>
      <dc:creator>ebardaka5</dc:creator>
      <dc:date>2015-05-13T01:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Estimate data for histogram without the Histogram Statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Estimate-data-for-histogram-without-the-Histogram-Statement/m-p/213769#M52718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about using&amp;nbsp;&amp;nbsp; proc rank&amp;nbsp; to group these raw data ,then&amp;nbsp; proc freq&amp;nbsp; get these group's freq ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 13:49:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Estimate-data-for-histogram-without-the-Histogram-Statement/m-p/213769#M52718</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-05-13T13:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: Estimate data for histogram without the Histogram Statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Estimate-data-for-histogram-without-the-Histogram-Statement/m-p/213770#M52719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply &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;&lt;P&gt;I ended up using the following but I will check proc rank as well: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc means data=&amp;amp;it04h mean min max;&lt;/P&gt;&lt;P&gt;var dhi;&lt;/P&gt;&lt;P&gt;output out=tmp min=mindhi max=maxdhi;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data forbin;&lt;/P&gt;&lt;P&gt;set tmp;&lt;/P&gt;&lt;P&gt;bin=(maxdhi - mindhi)/100;&lt;/P&gt;&lt;P&gt;drop i;&lt;/P&gt;&lt;P&gt;retain fmtname 'bin' type 'n';&lt;/P&gt;&lt;P&gt;do i = 0 to 99;&lt;/P&gt;&lt;P&gt;&amp;nbsp; binstart = mindhi+(i*bin);&lt;/P&gt;&lt;P&gt;&amp;nbsp; binend = binstart + bin-0.01;&lt;/P&gt;&lt;P&gt;&amp;nbsp; label = cat(binstart,"&amp;nbsp; to&amp;nbsp; ", binend);&lt;/P&gt;&lt;P&gt;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format cntlin=forbin (rename=(binstart=start binend=end)); run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=&amp;amp;it04h;&lt;/P&gt;&lt;P&gt;format dhi bin.;&lt;/P&gt;&lt;P&gt;table dhi ;&lt;/P&gt;&lt;P&gt;weight hpopwgt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 16:57:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Estimate-data-for-histogram-without-the-Histogram-Statement/m-p/213770#M52719</guid>
      <dc:creator>ebardaka5</dc:creator>
      <dc:date>2015-05-13T16:57:38Z</dc:date>
    </item>
  </channel>
</rss>

