<?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: df in NLEstimate macro for risk difference in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/df-in-NLEstimate-macro-for-risk-difference/m-p/894269#M44306</link>
    <description>&lt;P&gt;It would be. The value&amp;nbsp; specified in df= is used, as is, for the test. The documentation of df= is suggesting that if you specify df= that you typically will want to specify N-p, where N is the sample size, and p is the number of estimated parameters.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Sep 2023 14:14:21 GMT</pubDate>
    <dc:creator>StatDave</dc:creator>
    <dc:date>2023-09-14T14:14:21Z</dc:date>
    <item>
      <title>df in NLEstimate macro for risk difference</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/df-in-NLEstimate-macro-for-risk-difference/m-p/894253#M44303</link>
      <description>&lt;P&gt;The SAS note &lt;A href="https://support.sas.com/kb/37/228.html#note1" target="_blank"&gt;https://support.sas.com/kb/37/228.html#note1&lt;/A&gt; indicates that you can use the NLEstimate macro to get the risk difference. The example dataset has 100 records. In the example code, df=100. However, the macro indicates that it would typically be the number of observations minus the number of parameters estimated. So wouldn't that be 97 (100-3)?&lt;/P&gt;&lt;PRE&gt; proc logistic data=test;
         class a / param=glm;
         model y(event="1") = a;
         lsmeans a / ilink;
         store logfit;
         run;
      data fd; 
         length label f $32767; 
         infile datalines delimiter=',';
         input label f; 
         datalines;
      Prob Diff A1-A2,logistic(B_p1+b_p2) - logistic(B_p1+b_p3)
      Prob Diff A1-A3,logistic(B_p1+b_p2) - logistic(B_p1)
      Prob Diff A2-A3,logistic(B_p1+b_p3) - logistic(B_p1)
      ;
      %NLEstimate(instore=logfit, fdata=fd, df=100)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;df=,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Specifies the degrees of freedom to be used in the */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* test and confidence interval computed for the&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* estimated function(s). If omitted, large-sample&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Wald statistics are given. The degrees of freedom&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* for testing a linear combination of parameters in&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* a linear model would typically be the number of&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* observations used in fitting the model minus the&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* number of parameters estimated in the model –&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* essentially, the error degrees of freedom.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 12:21:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/df-in-NLEstimate-macro-for-risk-difference/m-p/894253#M44303</guid>
      <dc:creator>jean_kiser</dc:creator>
      <dc:date>2023-09-14T12:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: df in NLEstimate macro for risk difference</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/df-in-NLEstimate-macro-for-risk-difference/m-p/894269#M44306</link>
      <description>&lt;P&gt;It would be. The value&amp;nbsp; specified in df= is used, as is, for the test. The documentation of df= is suggesting that if you specify df= that you typically will want to specify N-p, where N is the sample size, and p is the number of estimated parameters.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 14:14:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/df-in-NLEstimate-macro-for-risk-difference/m-p/894269#M44306</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2023-09-14T14:14:21Z</dc:date>
    </item>
  </channel>
</rss>

