<?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: Degree of freedom in proc surveylogistic in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Degree-of-freedom-in-proc-surveylogistic/m-p/803354#M39488</link>
    <description>&lt;P&gt;Thank you for your reply. I still have a question. When should I use &lt;SPAN&gt;DF=INFINITY in the model? Although the numerator DF is the same as the DF that I got after using the&amp;nbsp;DF=INFINITY, I found the result for the OR is totally different. I know that when the df is approaching infinity, the F distribution is approaching the chi-square distribution. But I don't know when I should specify and how to apply this option.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Mar 2022 14:13:44 GMT</pubDate>
    <dc:creator>ChristinaMa96</dc:creator>
    <dc:date>2022-03-22T14:13:44Z</dc:date>
    <item>
      <title>Degree of freedom in proc surveylogistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Degree-of-freedom-in-proc-surveylogistic/m-p/802351#M39434</link>
      <description>&lt;P&gt;Hi! I am comparing two models by the likelihood ratio test and follow the instruction here:&lt;A href="https://support.sas.com/kb/24/474.html" target="_blank" rel="noopener"&gt;https://support.sas.com/kb/24/474.html&lt;/A&gt;&amp;nbsp;and I found a script here for the proc logisitic&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc logistic data = full_model;
model dependent_var = independent_var(s);
ods output GlobalTests = GlobalTests_full;
run;

data _null_;
set GlobalTests_full;
if test = "Likelihood Ratio" then do;
   call symput("ChiSq_full", ChiSq);
   call symput("DF_full", DF);
   end;
run;

proc logistic data = reduced_model;
model dependent_var = independent_var(s);
ods output GlobalTests = GlobalTests_reduced;
run;

data _null_;
set GlobalTests_reduced;
if test = "Likelihood Ratio" then do;
   call symput("ChiSq_reduced", ChiSq);
   call symput("DF_reduced", DF);
   end;
run;

data LRT_result;
LR = &amp;amp;ChiSq_full - &amp;amp;ChiSq_reduced;
DF = &amp;amp;DF_full - &amp;amp;DF_reduced;
p = 1 - probchi(ChiSq,DF);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I just wondered how to turn this in proc surveylogistic because I find that the degree of freedom is different. I cannot get the DF by this script since in proc survey logistic, the globaltest has a denominator DF and a numerator DF. But according to the SAS document,&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;The LRT statistic has an approximate chi-square distribution with degrees of freedom equal to the difference in the number of parameters between the full and reduced models.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Besides, the numerator DF was corrected by the Rao-Scott test in proc surveylogistic and is different from the difference in the number of parameters. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Which DF is the DF for the likelihood ratio test? Is there any smart way to compare models in proc surveylogistic?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 21:41:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Degree-of-freedom-in-proc-surveylogistic/m-p/802351#M39434</guid>
      <dc:creator>ChristinaMa96</dc:creator>
      <dc:date>2022-03-15T21:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Degree of freedom in proc surveylogistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Degree-of-freedom-in-proc-surveylogistic/m-p/803329#M39485</link>
      <description>&lt;P&gt;If you add the DF=INFINITY option to the MODEL statement in Proc SURVEYLOGISTIC then the Global tests, including the LRT, will be tested using a Chi-Square distribution.&amp;nbsp; You could then use a similar approach to your example to compute an overall LRT for the full versus reduced model.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 12:54:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Degree-of-freedom-in-proc-surveylogistic/m-p/803329#M39485</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2022-03-22T12:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Degree of freedom in proc surveylogistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Degree-of-freedom-in-proc-surveylogistic/m-p/803354#M39488</link>
      <description>&lt;P&gt;Thank you for your reply. I still have a question. When should I use &lt;SPAN&gt;DF=INFINITY in the model? Although the numerator DF is the same as the DF that I got after using the&amp;nbsp;DF=INFINITY, I found the result for the OR is totally different. I know that when the df is approaching infinity, the F distribution is approaching the chi-square distribution. But I don't know when I should specify and how to apply this option.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 14:13:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Degree-of-freedom-in-proc-surveylogistic/m-p/803354#M39488</guid>
      <dc:creator>ChristinaMa96</dc:creator>
      <dc:date>2022-03-22T14:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Degree of freedom in proc surveylogistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Degree-of-freedom-in-proc-surveylogistic/m-p/804122#M39566</link>
      <description>&lt;P&gt;For large denominator degrees of freedom you would want to use DF=INFINITY.&amp;nbsp; In your case, since you want to calculate LRTs I think it would be necessary to use it as well.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 15:54:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Degree-of-freedom-in-proc-surveylogistic/m-p/804122#M39566</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2022-03-25T15:54:21Z</dc:date>
    </item>
  </channel>
</rss>

