title: How to compare two models in SAS (complex survey design)
body: <p>I have two models to compare. The full model has an interaction term while the reduced model doesn't. I am using the likelihood ratio test to compare two models and generate a p-value to report.</p>
  <p>I found the script here is very helpful. <a href="https://stackoverflow.com/questions/7734495/how-to-perform-likelihood-ratio-test-on-logistic-regression-in-sas">How to perform likelihood ratio test on logistic regression in SAS?</a></p>
  <p>But I had a question when I tried it in my own dataset. The dataset is from a complex survey and requires <code>proc survey*</code>. I don't know where to find the <strong>degree of freedom</strong> because in the <code>proc surveylogistic</code>, the global test has a denominator DF and a numerator DF and they are corrected by the Rao-Scott test.</p>
  <p>In the SAS document <a href="https://support.sas.com/kb/24/474.html" rel="nofollow noreferrer">here</a>, I found that</p>
  <blockquote>
  <p>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.</p>
  </blockquote>
  <p>I just don't know whether I should use the DF(corrected by Rao-Scott test) or the difference in the number of parameters, which can be calculated from the DF of Wald tests.</p>
  <p>I had another question about the <a href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_surveylogistic_details40.htm#statug.surveylogistic.surveylogistictlh" rel="nofollow noreferrer">SAS document</a>:</p>
  <blockquote>
  <p>As the denominator degrees of freedom grows, an <em>F</em> distribution approaches a chi-square distribution, and similarly a <em>t</em> distribution approaches a normal distribution.</p>
  </blockquote>
  <p>Does that mean I need to calculate the <em>p</em> by <code>p=1-probf(LR,ndf,ddf)</code> rather than <code>probchi</code>?</p>
  <p>I messed up with the degree of freedom. I tried all these and it returns different ps. I just wondered which one is the correct one. Is there a smart way to compare models in SAS with the <code>proc survey*</code>?</p>
  <p>Thank you!</p>