<?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 Domain v. Number of Observations Used in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Number-of-Observations-in-Domain-v-Number-of-Observations-Used/m-p/831278#M41147</link>
    <description>&lt;P&gt;I'm really not sure what your question is. You state: "The log (See image #3 below) says nothing of missing values or non-positive weights."&lt;/P&gt;
&lt;P&gt;However the third Note line clearly states that. I am not going to retype the text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hint: Post LOGS as text, copy the text from the log, on the forum open a text box and paste the text. It should be easier than creating an image. Plus when we want to make a suggestion to code or point out a syntax error it is much easier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want a result for domain when it is missing then add the option to the domain statement.&lt;/P&gt;
&lt;P&gt;From the documentation:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV class="xis-refProc"&gt;
&lt;DIV id="statug.surveylogistic.domainstmt" class="AAsection"&gt;
&lt;P&gt;When determining levels of a &lt;FONT style="background-color: #fcdec0;"&gt;DOMAIN&lt;/FONT&gt; variable, an observation with missing values for this &lt;FONT style="background-color: #fcdec0;"&gt;DOMAIN&lt;/FONT&gt; variable is excluded, unless you specify the &lt;A href="http://127.0.0.1:62349/help/statug.hlp/statug_surveylogistic_syntax01.htm#statug.surveylogistic.missingopt" target="_blank"&gt;MISSING&lt;/A&gt; option.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/36911"&gt;@_maldini_&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am building sequential logistic regression models using PROC SURVEYLOGISTIC (weighted data). I have an exposure variable, an outcome variable and several covariates. As you would expect, the more covariates I add to the model, the lower the "&lt;STRONG&gt;Number of Observations Used&lt;/STRONG&gt;" (See image #1).&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-center" image-alt="Screen Shot 2022-08-30 at 4.59.57 PM.png" style="width: 976px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/74869i9AE6C6E0852EC32C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-08-30 at 4.59.57 PM.png" alt="Screen Shot 2022-08-30 at 4.59.57 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I'm trying to create a table (above), that displays the number of events and the weighted percentage &lt;/SPAN&gt;&lt;U style="font-family: inherit;"&gt;for each level of the exposure variable&lt;/U&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;for each model &lt;/STRONG&gt;&lt;SPAN&gt;(each model has a different number of observations).&amp;nbsp;&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;My understanding is that the difference between the &lt;STRONG&gt;number of observations in the domain&lt;/STRONG&gt; and the &lt;STRONG&gt;number of observations used&lt;/STRONG&gt; is a function of missing values, non-positive weights and possibly other factors.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/74872iFDA070DC212D34A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The log (See image #3 below) says nothing of missing values or non-positive weights.&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-center" image-alt="Screen Shot 2022-08-30 at 5.11.42 PM.png" style="width: 876px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/74873i88B834B4B0144234/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-08-30 at 5.11.42 PM.png" alt="Screen Shot 2022-08-30 at 5.11.42 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can get the number of events and weighted percentage by using PROC SURVEGYFREQ (not shown) with a DOMAIN statement, but that uses the&amp;nbsp;&lt;STRONG&gt;Number of Observations in Domain&lt;/STRONG&gt;, not the &lt;STRONG&gt;Number of Observations Used&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My syntax for the DOMAIN variable is intended to eliminate any missing values:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;flag_1 = 
	(
	cann_use_status ne . and 
	ever_told_mi in(1,2) and
	age_yrs ne . and
 	gender ne . and
	race_all ne . and
 	educ_gtet_20 ne . and
 	hh_income ne . 
	); &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;How can I get the number of events (i.e., number of "Yes" in ever_told_mi) and the weighted percentage using the&amp;nbsp;Number of Observations Used, not the&amp;nbsp;Number of Observations in Domain?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for the long and complicated question. Thanks for your help.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 31 Aug 2022 15:06:48 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-08-31T15:06:48Z</dc:date>
    <item>
      <title>Number of Observations in Domain v. Number of Observations Used</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Number-of-Observations-in-Domain-v-Number-of-Observations-Used/m-p/831177#M41146</link>
      <description>&lt;P&gt;I am building sequential logistic regression models using PROC SURVEYLOGISTIC (weighted data). I have an exposure variable, an outcome variable and several covariates. As you would expect, the more covariates I add to the model, the lower the "&lt;STRONG&gt;Number of Observations Used&lt;/STRONG&gt;" (See image #1).&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-center" image-alt="Screen Shot 2022-08-30 at 4.59.57 PM.png" style="width: 976px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/74869i9AE6C6E0852EC32C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-08-30 at 4.59.57 PM.png" alt="Screen Shot 2022-08-30 at 4.59.57 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I'm trying to create a table (above), that displays the number of events and the weighted percentage &lt;/SPAN&gt;&lt;U style="font-family: inherit;"&gt;for each level of the exposure variable&lt;/U&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;for each model &lt;/STRONG&gt;&lt;SPAN&gt;(each model has a different number of observations).&amp;nbsp;&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;My understanding is that the difference between the &lt;STRONG&gt;number of observations in the domain&lt;/STRONG&gt; and the &lt;STRONG&gt;number of observations used&lt;/STRONG&gt; is a function of missing values, non-positive weights and possibly other factors.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/74872iFDA070DC212D34A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The log (See image #3 below) says nothing of missing values or non-positive weights.&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-center" image-alt="Screen Shot 2022-08-30 at 5.11.42 PM.png" style="width: 876px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/74873i88B834B4B0144234/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-08-30 at 5.11.42 PM.png" alt="Screen Shot 2022-08-30 at 5.11.42 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can get the number of events and weighted percentage by using PROC SURVEGYFREQ (not shown) with a DOMAIN statement, but that uses the&amp;nbsp;&lt;STRONG&gt;Number of Observations in Domain&lt;/STRONG&gt;, not the &lt;STRONG&gt;Number of Observations Used&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My syntax for the DOMAIN variable is intended to eliminate any missing values:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;flag_1 = 
	(
	cann_use_status ne . and 
	ever_told_mi in(1,2) and
	age_yrs ne . and
 	gender ne . and
	race_all ne . and
 	educ_gtet_20 ne . and
 	hh_income ne . 
	); &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;How can I get the number of events (i.e., number of "Yes" in ever_told_mi) and the weighted percentage using the&amp;nbsp;Number of Observations Used, not the&amp;nbsp;Number of Observations in Domain?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for the long and complicated question. Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 00:25:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Number-of-Observations-in-Domain-v-Number-of-Observations-Used/m-p/831177#M41146</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2022-08-31T00:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Number of Observations in Domain v. Number of Observations Used</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Number-of-Observations-in-Domain-v-Number-of-Observations-Used/m-p/831278#M41147</link>
      <description>&lt;P&gt;I'm really not sure what your question is. You state: "The log (See image #3 below) says nothing of missing values or non-positive weights."&lt;/P&gt;
&lt;P&gt;However the third Note line clearly states that. I am not going to retype the text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hint: Post LOGS as text, copy the text from the log, on the forum open a text box and paste the text. It should be easier than creating an image. Plus when we want to make a suggestion to code or point out a syntax error it is much easier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want a result for domain when it is missing then add the option to the domain statement.&lt;/P&gt;
&lt;P&gt;From the documentation:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV class="xis-refProc"&gt;
&lt;DIV id="statug.surveylogistic.domainstmt" class="AAsection"&gt;
&lt;P&gt;When determining levels of a &lt;FONT style="background-color: #fcdec0;"&gt;DOMAIN&lt;/FONT&gt; variable, an observation with missing values for this &lt;FONT style="background-color: #fcdec0;"&gt;DOMAIN&lt;/FONT&gt; variable is excluded, unless you specify the &lt;A href="http://127.0.0.1:62349/help/statug.hlp/statug_surveylogistic_syntax01.htm#statug.surveylogistic.missingopt" target="_blank"&gt;MISSING&lt;/A&gt; option.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/36911"&gt;@_maldini_&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am building sequential logistic regression models using PROC SURVEYLOGISTIC (weighted data). I have an exposure variable, an outcome variable and several covariates. As you would expect, the more covariates I add to the model, the lower the "&lt;STRONG&gt;Number of Observations Used&lt;/STRONG&gt;" (See image #1).&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-center" image-alt="Screen Shot 2022-08-30 at 4.59.57 PM.png" style="width: 976px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/74869i9AE6C6E0852EC32C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-08-30 at 4.59.57 PM.png" alt="Screen Shot 2022-08-30 at 4.59.57 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I'm trying to create a table (above), that displays the number of events and the weighted percentage &lt;/SPAN&gt;&lt;U style="font-family: inherit;"&gt;for each level of the exposure variable&lt;/U&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;for each model &lt;/STRONG&gt;&lt;SPAN&gt;(each model has a different number of observations).&amp;nbsp;&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;My understanding is that the difference between the &lt;STRONG&gt;number of observations in the domain&lt;/STRONG&gt; and the &lt;STRONG&gt;number of observations used&lt;/STRONG&gt; is a function of missing values, non-positive weights and possibly other factors.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/74872iFDA070DC212D34A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The log (See image #3 below) says nothing of missing values or non-positive weights.&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-center" image-alt="Screen Shot 2022-08-30 at 5.11.42 PM.png" style="width: 876px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/74873i88B834B4B0144234/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-08-30 at 5.11.42 PM.png" alt="Screen Shot 2022-08-30 at 5.11.42 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can get the number of events and weighted percentage by using PROC SURVEGYFREQ (not shown) with a DOMAIN statement, but that uses the&amp;nbsp;&lt;STRONG&gt;Number of Observations in Domain&lt;/STRONG&gt;, not the &lt;STRONG&gt;Number of Observations Used&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My syntax for the DOMAIN variable is intended to eliminate any missing values:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;flag_1 = 
	(
	cann_use_status ne . and 
	ever_told_mi in(1,2) and
	age_yrs ne . and
 	gender ne . and
	race_all ne . and
 	educ_gtet_20 ne . and
 	hh_income ne . 
	); &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;How can I get the number of events (i.e., number of "Yes" in ever_told_mi) and the weighted percentage using the&amp;nbsp;Number of Observations Used, not the&amp;nbsp;Number of Observations in Domain?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for the long and complicated question. Thanks for your help.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 15:06:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Number-of-Observations-in-Domain-v-Number-of-Observations-Used/m-p/831278#M41147</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-08-31T15:06:48Z</dc:date>
    </item>
  </channel>
</rss>

