<?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: Calculation about score function in Proc Logistic in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Calculation-about-score-function-in-Proc-Logistic/m-p/334773#M17663</link>
    <description>&lt;P&gt;It uses the variables listed in the ParameterEstimates tables.&lt;/P&gt;
&lt;P&gt;If you're doing a selection method, the last table is the significant one.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want code that replicates the scoring code, look at CODE statement within PROC LOGISTIC.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the various methods for scoring data here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html" target="_blank"&gt;http://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a fully worked example to demonstrate the issue.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120780/highlight/true#M6321" target="_blank"&gt;https://communities.sas.com/t5/SAS-Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120780/highlight/true#M6321&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Feb 2017 21:01:12 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-02-21T21:01:12Z</dc:date>
    <item>
      <title>Calculation about score function in Proc Logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculation-about-score-function-in-Proc-Logistic/m-p/334768#M17662</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone tell me how SAS calculates probalibility using proc logistic score statement? Why my manual probability calculation is so different from SAS's? Does SAS take all variables into calculation or only significant ones?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;P=exp(F)/(1+exp(F)) = 1 / (1+exp(-F))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;Analysis of Maximum Likelihood Estimates Parameter &amp;nbsp; DF Estimate Standard&lt;BR /&gt;Error Wald&lt;BR /&gt;Chi-Square Pr&amp;nbsp;&amp;gt;&amp;nbsp;ChiSq &lt;TABLE cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Intercept&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;-0.9724&lt;/TD&gt;&lt;TD&gt;0.2331&lt;/TD&gt;&lt;TD&gt;17.4036&lt;/TD&gt;&lt;TD&gt;&amp;lt;.0001&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;classA&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0.0150&lt;/TD&gt;&lt;TD&gt;0.0827&lt;/TD&gt;&lt;TD&gt;0.0328&lt;/TD&gt;&lt;TD&gt;0.8562&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;classA&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;-0.0694&lt;/TD&gt;&lt;TD&gt;0.0380&lt;/TD&gt;&lt;TD&gt;3.3468&lt;/TD&gt;&lt;TD&gt;0.0673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t;1&lt;/TD&gt;&lt;TD&gt;0.000259&lt;/TD&gt;&lt;TD&gt;0.000040&lt;/TD&gt;&lt;TD&gt;42.9420&lt;/TD&gt;&lt;TD&gt;&amp;lt;.0001&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;Numeric3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2.1190&lt;/TD&gt;&lt;TD&gt;0.1641&lt;/TD&gt;&lt;TD&gt;166.7216&lt;/TD&gt;&lt;TD&gt;&amp;lt;.0001&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!!!&lt;/P&gt;&lt;P&gt;Fan&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 20:52:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculation-about-score-function-in-Proc-Logistic/m-p/334768#M17662</guid>
      <dc:creator>fannavivian</dc:creator>
      <dc:date>2017-02-21T20:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation about score function in Proc Logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculation-about-score-function-in-Proc-Logistic/m-p/334773#M17663</link>
      <description>&lt;P&gt;It uses the variables listed in the ParameterEstimates tables.&lt;/P&gt;
&lt;P&gt;If you're doing a selection method, the last table is the significant one.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want code that replicates the scoring code, look at CODE statement within PROC LOGISTIC.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the various methods for scoring data here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html" target="_blank"&gt;http://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a fully worked example to demonstrate the issue.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120780/highlight/true#M6321" target="_blank"&gt;https://communities.sas.com/t5/SAS-Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120780/highlight/true#M6321&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 21:01:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculation-about-score-function-in-Proc-Logistic/m-p/334773#M17663</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-02-21T21:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation about score function in Proc Logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculation-about-score-function-in-Proc-Logistic/m-p/335028#M17670</link>
      <description>&lt;P&gt;Appreciate your answer. Please correct me if I am wrong. As for SAS's calculation, it takes all the variables in the parameter estimates report, just the all the predictor variables. And as in your answers, there's still difference. So I really would like to know what makes the difference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 16:35:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculation-about-score-function-in-Proc-Logistic/m-p/335028#M17670</guid>
      <dc:creator>fannavivian</dc:creator>
      <dc:date>2017-02-22T16:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation about score function in Proc Logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculation-about-score-function-in-Proc-Logistic/m-p/335038#M17671</link>
      <description>&lt;P&gt;Without seeing your code or data, it is difficult to guess your problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have missing values? If so, you need to handle&amp;nbsp;them correctly. Are you using the full precision of the parameter estimates or just the 4 decimal place shown in the table?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following is a brief example that uses the DATA step to score. &amp;nbsp;In practice, you would use the CODE statement, the SCORE statement, or PROC PLM, as explained&amp;nbsp;in the article that Reeza&amp;nbsp;links to.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=sashelp.class;
model sex = height weight age;
output out=LogiPred(keep=P) pred=P;
run;

data DataPred;
set sashelp.class;
F = -1.19262669802445  + 
    -0.15172772458382 * Height +  
    -0.13262689324423 * Weight +
     1.76465589368491 * Age;
P = 1 / (1 + exp(-F));
keep P;
run;

proc compare base=LogiPred compare=DataPred method=absolute criterion=1e-12;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Feb 2017 17:00:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculation-about-score-function-in-Proc-Logistic/m-p/335038#M17671</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-02-22T17:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation about score function in Proc Logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculation-about-score-function-in-Proc-Logistic/m-p/335052#M17672</link>
      <description>&lt;P&gt;99% of the time the difference will be due to an error in the manual calculation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 18:18:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculation-about-score-function-in-Proc-Logistic/m-p/335052#M17672</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-02-22T18:18:31Z</dc:date>
    </item>
  </channel>
</rss>

