<?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: Number of observations in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/400053#M96951</link>
    <description>&lt;P&gt;You have 94 observations with at least one of&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;nD_assets1 post nsize nlev ner ncash nGrowth nR_E nroa fic fyear sic2&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If they are all numeric vars, you can find those cases by&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data suspect;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;where nmiss(nD_assets1, post nsize, nlev, ner, ncash, nGrowth, nR_E, nroa, fic, fyear, sic2)&amp;gt;0;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
    <pubDate>Sat, 30 Sep 2017 23:25:54 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2017-09-30T23:25:54Z</dc:date>
    <item>
      <title>Number of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/399979#M96912</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I have a dataset in which all the variables have a total observation of 68811 with there are no missing values. However, SAS uses only 68717 in regressions. Is there a way of ensuring that the number of observations equal the number of observations used in the regressions?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 07:46:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/399979#M96912</guid>
      <dc:creator>Theo_Gh</dc:creator>
      <dc:date>2017-09-30T07:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Number of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/399996#M96922</link>
      <description>&lt;P&gt;Show us the sas log, which will help us help you.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 13:02:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/399996#M96922</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-09-30T13:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Number of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/399997#M96923</link>
      <description>&lt;P&gt;There are always one or more reasons why observations are excluded: missing values, nonpositive weights, or nonpositive frequencies.&amp;nbsp; Did you look at the number of observations table?&amp;nbsp; Does it agree with your assessment that there are no missing values?&amp;nbsp; You can output it to a data set and print it to see additional information about why observations were excluded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
   set sashelp.class;
   if uniform(7) lt 0.1 then height = .;
   if uniform(7) lt 0.1 then weight = .;
   f = uniform(7) &amp;gt; 0.1;
   w = uniform(7) &amp;gt; 0.1;
   run;
proc print; run;
proc reg;
   model weight = height;
   freq f;
   weight w;
   ods output nobs=n;
quit;
proc print; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 13:08:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/399997#M96923</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-09-30T13:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Number of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/400044#M96944</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/123993"&gt;@Theo_Gh&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;I have a dataset in which all the variables have a total observation of 68811 with there are no missing values. However, SAS uses only 68717 in regressions. Is there a way of ensuring that the number of observations equal the number of observations used in the regressions?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You need to post more information.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS uses all non-misisng by default so either you have missing or a WHERE statement or something else that's not being stated. Most likely it's the third OR option here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 22:54:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/400044#M96944</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-09-30T22:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Number of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/400052#M96950</link>
      <description>&lt;P&gt;Sorry everyone; actually SAS does indicate that there are values. Problem is I can't identify them.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The log is provided below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc surveyreg data=theo.final;&lt;BR /&gt;3 cluster gvkey;&lt;BR /&gt;4 class fic fyear sic2;&lt;BR /&gt;5 model nD_assets1= post nsize nlev ner ncash nGrowth nR_E nroa fic fyear sic2/solution ADJRSQ;&lt;BR /&gt;6 run;&lt;/P&gt;&lt;P&gt;NOTE: Writing HTML Body file: sashtml.htm&lt;BR /&gt;NOTE: In data set FINAL, total 68811 observations read, 94 observations with missing values are&lt;BR /&gt;omitted.&lt;BR /&gt;NOTE: PROCEDURE SURVEYREG used (Total process time):&lt;BR /&gt;real time 8.16 seconds&lt;BR /&gt;cpu time 2.96 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 23:18:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/400052#M96950</guid>
      <dc:creator>Theo_Gh</dc:creator>
      <dc:date>2017-09-30T23:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: Number of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/400053#M96951</link>
      <description>&lt;P&gt;You have 94 observations with at least one of&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;nD_assets1 post nsize nlev ner ncash nGrowth nR_E nroa fic fyear sic2&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If they are all numeric vars, you can find those cases by&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data suspect;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;where nmiss(nD_assets1, post nsize, nlev, ner, ncash, nGrowth, nR_E, nroa, fic, fyear, sic2)&amp;gt;0;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 23:25:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/400053#M96951</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-09-30T23:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Number of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/400054#M96952</link>
      <description>&lt;P&gt;data ...;&lt;/P&gt;
&lt;P&gt;set ...;&lt;/P&gt;
&lt;P&gt;if nmiss(of ... all analysis variables variable list...);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;proc print; run;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 23:26:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/400054#M96952</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-09-30T23:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Number of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/400055#M96953</link>
      <description>data theo.new;&lt;BR /&gt;set theo.final;&lt;BR /&gt;where nmiss(nD_assets1, post nsize, nlev, ner, ncash, nGrowth, nR_E, nroa)&amp;gt;0;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;I used the code above but I'm getting a syntax error</description>
      <pubDate>Sat, 30 Sep 2017 23:48:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/400055#M96953</guid>
      <dc:creator>Theo_Gh</dc:creator>
      <dc:date>2017-09-30T23:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Number of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/400056#M96954</link>
      <description>&lt;P&gt;put a comma between all of your variables (or use OF as I did then you don't need any commas).&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 23:54:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/400056#M96954</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-09-30T23:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Number of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/400057#M96955</link>
      <description>Please bear with me.&lt;BR /&gt;The codes works now.I get a new dataset but when I use the new dataset in a regression, I get an error that there are no observations in the dataset even though there are</description>
      <pubDate>Sun, 01 Oct 2017 00:17:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/400057#M96955</guid>
      <dc:creator>Theo_Gh</dc:creator>
      <dc:date>2017-10-01T00:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Number of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/400059#M96956</link>
      <description>&lt;P&gt;You asked how to find out how to identify the observations with missing values.&amp;nbsp; That is what I showed you.&amp;nbsp; You can't analyze that data set.&amp;nbsp; Analyze the original data set.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Oct 2017 00:22:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-observations/m-p/400059#M96956</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-10-01T00:22:19Z</dc:date>
    </item>
  </channel>
</rss>

