<?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 PROC SURVEYLOGISTIC with survival data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-SURVEYLOGISTIC-with-survival-data/m-p/870227#M343726</link>
    <description>&lt;P&gt;Hello all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using PROC SURVEYLOGISTIC to estimate odds of all-cause mortality using NHANES data. However, it appears that SAS is not including all available individuals in the model. Can anyone explain what's happening here? Let's just say for the purpose of this example the only exposure variables are age and sex.&amp;nbsp;The overall N for my domain (pop=1, which represents inclusion criteria) is N = 31,304.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I use PROC SURVEYFREQ for my outcome variable (all-cause mortality) within the domain that I am using (my inclusion criteria), I get N=5,022 deceased and N=26,229 alive.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I use PROC SURVEYLOGISTIC to model all-cause mortality= age sex, the "Domain Analysis" box shows "Number of observations in Domain" as 31,304. However, the "Response Profile" box shows only N=1,326 deceased and N=12,086 alive. What is causing the discrepancy here?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sophie&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S. the same thing happened with my Cox model&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc surveyfreq data=work.have; 
	weight WTMEC8YR;
	cluster sdmvpsu;
	strata sdmvstra;
	table pop*alldeath;
	run;

proc surveylogistic data=work.have ORDER=INTERNAL varmethod=taylor nomcar;
	weight WTMEC8YR;
	cluster sdmvpsu;
	strata sdmvstra;
	domain pop;
	class riagendr (REF=LAST)/ param=ref ORDER=INTERNAL;
	model alldeath (desc)= riagendr ridageyr; 
run &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="proc_surveyfreq output.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82770iE1E76324F87C1020/image-size/medium?v=v2&amp;amp;px=400" role="button" title="proc_surveyfreq output.jpg" alt="proc_surveyfreq output.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="domain_summary.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82771iFB2CEFBBD089F7E3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="domain_summary.jpg" alt="domain_summary.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="response_profile.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82772i90CFBFFBD2B1EC8A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="response_profile.jpg" alt="response_profile.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Apr 2023 18:43:43 GMT</pubDate>
    <dc:creator>sophiec</dc:creator>
    <dc:date>2023-04-17T18:43:43Z</dc:date>
    <item>
      <title>PROC SURVEYLOGISTIC with survival data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SURVEYLOGISTIC-with-survival-data/m-p/870227#M343726</link>
      <description>&lt;P&gt;Hello all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using PROC SURVEYLOGISTIC to estimate odds of all-cause mortality using NHANES data. However, it appears that SAS is not including all available individuals in the model. Can anyone explain what's happening here? Let's just say for the purpose of this example the only exposure variables are age and sex.&amp;nbsp;The overall N for my domain (pop=1, which represents inclusion criteria) is N = 31,304.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I use PROC SURVEYFREQ for my outcome variable (all-cause mortality) within the domain that I am using (my inclusion criteria), I get N=5,022 deceased and N=26,229 alive.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I use PROC SURVEYLOGISTIC to model all-cause mortality= age sex, the "Domain Analysis" box shows "Number of observations in Domain" as 31,304. However, the "Response Profile" box shows only N=1,326 deceased and N=12,086 alive. What is causing the discrepancy here?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sophie&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S. the same thing happened with my Cox model&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc surveyfreq data=work.have; 
	weight WTMEC8YR;
	cluster sdmvpsu;
	strata sdmvstra;
	table pop*alldeath;
	run;

proc surveylogistic data=work.have ORDER=INTERNAL varmethod=taylor nomcar;
	weight WTMEC8YR;
	cluster sdmvpsu;
	strata sdmvstra;
	domain pop;
	class riagendr (REF=LAST)/ param=ref ORDER=INTERNAL;
	model alldeath (desc)= riagendr ridageyr; 
run &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="proc_surveyfreq output.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82770iE1E76324F87C1020/image-size/medium?v=v2&amp;amp;px=400" role="button" title="proc_surveyfreq output.jpg" alt="proc_surveyfreq output.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="domain_summary.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82771iFB2CEFBBD089F7E3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="domain_summary.jpg" alt="domain_summary.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="response_profile.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82772i90CFBFFBD2B1EC8A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="response_profile.jpg" alt="response_profile.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 18:43:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SURVEYLOGISTIC-with-survival-data/m-p/870227#M343726</guid>
      <dc:creator>sophiec</dc:creator>
      <dc:date>2023-04-17T18:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SURVEYLOGISTIC with survival data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SURVEYLOGISTIC-with-survival-data/m-p/870229#M343727</link>
      <description>&lt;P&gt;The default behavior for SAS is that any of the variables that are on the CLASS, DOMAIN or the right side of the = sign in a MODEL statement and have missing values then the observation is dropped from the model.&lt;/P&gt;
&lt;P&gt;Class or Domain statements that set MISSING as a valid level of the variable will keep them in the model but interpretation may be difficult depending on just what those variables represent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you need to look at more of the variable than just POP as to which are missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the survey procs that will extend to the sample design variables as well. Missing&amp;nbsp; strata, cluster or weight means the observation is excluded.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 19:20:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SURVEYLOGISTIC-with-survival-data/m-p/870229#M343727</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-04-17T19:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SURVEYLOGISTIC with survival data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SURVEYLOGISTIC-with-survival-data/m-p/870244#M343733</link>
      <description>&lt;P&gt;Thanks for your response &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;! Unfortunately I still don't quite understand.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The exact same variables are being used in both PROCs with regards to the stratum/cluster/domain. There are &lt;U&gt;&lt;STRONG&gt;no&lt;/STRONG&gt;&lt;/U&gt; missing values for the CLASS variable "RIAGENDR" or the explanatory variable "RIDAGEYR". The outcome variable "ALLCAUSE" in the MODEL statement only has 200 missing values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shouldn't then the logistic regression model be using all the available observations from "ALLCAUSE" that are counted using PROC FREQ? I'm not clear on where additional missing values could be from.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for your time!&lt;/P&gt;&lt;P&gt;Sophie&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 20:08:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SURVEYLOGISTIC-with-survival-data/m-p/870244#M343733</guid>
      <dc:creator>sophiec</dc:creator>
      <dc:date>2023-04-17T20:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SURVEYLOGISTIC with survival data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SURVEYLOGISTIC-with-survival-data/m-p/870249#M343735</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may have to share the LOG with the code and all messages. Copy the code and all the notes or warnings from from the log, open a text box on the forum and paste all the text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 20:38:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SURVEYLOGISTIC-with-survival-data/m-p/870249#M343735</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-04-17T20:38:58Z</dc:date>
    </item>
  </channel>
</rss>

