<?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 percent of nonmissing in tabulate in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/percent-of-nonmissing-in-tabulate/m-p/118757#M32763</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all:&lt;/P&gt;&lt;P&gt; I wonder if you can calculate percentage of nonmissing values using proc tabulate. What I need is sth. like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mean&lt;/P&gt;&lt;P&gt;var&amp;nbsp;&amp;nbsp; Std&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Percent of nonmissing values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although the statistic can be calculated as simple as N/(N + NMISS), I cannot seem to find a way to do that directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jan 2013 17:50:28 GMT</pubDate>
    <dc:creator>tradepeter</dc:creator>
    <dc:date>2013-01-08T17:50:28Z</dc:date>
    <item>
      <title>percent of nonmissing in tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/percent-of-nonmissing-in-tabulate/m-p/118757#M32763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all:&lt;/P&gt;&lt;P&gt; I wonder if you can calculate percentage of nonmissing values using proc tabulate. What I need is sth. like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mean&lt;/P&gt;&lt;P&gt;var&amp;nbsp;&amp;nbsp; Std&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Percent of nonmissing values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although the statistic can be calculated as simple as N/(N + NMISS), I cannot seem to find a way to do that directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 17:50:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/percent-of-nonmissing-in-tabulate/m-p/118757#M32763</guid>
      <dc:creator>tradepeter</dc:creator>
      <dc:date>2013-01-08T17:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: percent of nonmissing in tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/percent-of-nonmissing-in-tabulate/m-p/118758#M32764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; I'm confused. N+NMISS would equal the total number ...since, by definition, the N statistic &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;is&lt;/STRONG&gt;&lt;/SPAN&gt; the count of non-MISSING values and NMISS &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;is&lt;/STRONG&gt;&lt;/SPAN&gt; the count of MISSING values. But, for example if you have 4 observations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;name age gender height&lt;/P&gt;&lt;P&gt;alan&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp; M&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 68.0&lt;/P&gt;&lt;P&gt;bob&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&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; .&lt;/P&gt;&lt;P&gt;carl&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 72.0&lt;/P&gt;&lt;P&gt;dave&amp;nbsp;&amp;nbsp; 12&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; 72.4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have 4 total observations. NAME has N=4 and NMISS=0; AGE has N=3 and NMISS=1; HEIGHT has N=3 and NMISS=1 and GENDER has N=2 and NMISS=2....so when you show Percent of non-missing, I get confused because the PCTN is automatically calculated with N (so it would be the percent of the nonmissing). But TABULATE will not "add" N+NMISS automatically. On the other hand, look at the difference the MISSING option has in PROC FREQ in the calculate of percentages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;data testdata;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; infile datalines dlm=',' dsd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; input name $ age gender $ height;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;datalines;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;alan,&amp;nbsp; 10,&amp;nbsp;&amp;nbsp; M,&amp;nbsp;&amp;nbsp;&amp;nbsp; 68.0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;bob,&amp;nbsp;&amp;nbsp; 11,&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;carl,&amp;nbsp;&amp;nbsp; .,&amp;nbsp;&amp;nbsp; M,&amp;nbsp;&amp;nbsp;&amp;nbsp; 72.0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;dave,&amp;nbsp; 12 ,&amp;nbsp;&amp;nbsp; ,&amp;nbsp;&amp;nbsp;&amp;nbsp; 72.4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods listing;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc print data=testdata;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc freq data=testdata;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;title 'freq with missing option';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; tables name gender age height / missing;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc freq data=testdata;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;title 'freq without missing option';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; tables name gender age height ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc tabulate data=testdata missing;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;title 'tabulate with n and nmiss';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; var age height;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; table age,(mean std n nmiss pctn);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; table height,(mean std n nmiss pctn);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 20:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/percent-of-nonmissing-in-tabulate/m-p/118758#M32764</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2013-01-08T20:21:39Z</dc:date>
    </item>
  </channel>
</rss>

