<?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: Proc Logistic. Why is predicted probability different than calculated from a regression equation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-Why-is-predicted-probability-different-than/m-p/763793#M241895</link>
    <description>&lt;P&gt;Shoot. That's embarrassing. Thanks anyway.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Aug 2021 07:33:51 GMT</pubDate>
    <dc:creator>Jedrek369</dc:creator>
    <dc:date>2021-08-25T07:33:51Z</dc:date>
    <item>
      <title>Proc Logistic. Why is predicted probability different than calculated from a regression equation?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-Why-is-predicted-probability-different-than/m-p/763583#M241840</link>
      <description>&lt;P&gt;As in a subject.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data have;
set sashelp.cars;
isUSA = Origin="USA";
run;

proc logistic data=have;
model isUSA=EngineSize Cylinders Horsepower;
output out=pred p=p;
run;

data want;
keep p p_manual;
set pred;
p_manual = 1/(1+EXP(-1 * 0.3199 -3.091*EngineSize 
+0.5735*Cylinders 
+0.0334*Horsepower));
run;&lt;/PRE&gt;&lt;P&gt;Why is &lt;STRONG&gt;p&lt;/STRONG&gt; different than &lt;STRONG&gt;p_manual&amp;nbsp;&lt;/STRONG&gt;variable in the want dataset?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 16:24:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-Why-is-predicted-probability-different-than/m-p/763583#M241840</guid>
      <dc:creator>Jedrek369</dc:creator>
      <dc:date>2021-08-24T16:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic. Why is predicted probability different than calculated from a regression equation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-Why-is-predicted-probability-different-than/m-p/763586#M241842</link>
      <description>&lt;P&gt;How different?&lt;BR /&gt;Here's an example showing results that match exactly.&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/td-p/120780" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/td-p/120780&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You were missing a set of brackets in your formula:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;p_manual = 1/(1+EXP(-1 * &lt;FONT size="4" color="#FF0000"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/FONT&gt;0.3199 -3.091*EngineSize 
+0.5735*Cylinders 
+0.0334*Horsepower&lt;FONT size="4" color="#FF0000"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;));&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/343368"&gt;@Jedrek369&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;As in a subject.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;
set sashelp.cars;
isUSA = Origin="USA";
run;

proc logistic data=have;
model isUSA=EngineSize Cylinders Horsepower;
output out=pred p=p;
run;

data want;
keep p p_manual;
set pred;
p_manual = 1/(1+EXP(-1 * 0.3199 -3.091*EngineSize 
+0.5735*Cylinders 
+0.0334*Horsepower));
run;&lt;/PRE&gt;
&lt;P&gt;Why is &lt;STRONG&gt;p&lt;/STRONG&gt; different than &lt;STRONG&gt;p_manual&amp;nbsp;&lt;/STRONG&gt;variable in the want dataset?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 16:55:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-Why-is-predicted-probability-different-than/m-p/763586#M241842</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-08-24T16:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic. Why is predicted probability different than calculated from a regression equation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-Why-is-predicted-probability-different-than/m-p/763793#M241895</link>
      <description>&lt;P&gt;Shoot. That's embarrassing. Thanks anyway.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 07:33:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-Why-is-predicted-probability-different-than/m-p/763793#M241895</guid>
      <dc:creator>Jedrek369</dc:creator>
      <dc:date>2021-08-25T07:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic. Why is predicted probability different than calculated from a regression equation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-Why-is-predicted-probability-different-than/m-p/763823#M241910</link>
      <description>&lt;P&gt;Tip: The formula&lt;/P&gt;
&lt;PRE&gt;p_manual = 1/(1+EXP(-1 * (...)));&lt;/PRE&gt;
&lt;P&gt;can be simplified to&lt;/P&gt;
&lt;PRE&gt;p_manual = logistic(...);&lt;/PRE&gt;
&lt;P&gt;(see &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/n13u4gq0z9qwo4n15f6e6bg8mv79.htm" target="_blank" rel="noopener"&gt;LOGISTIC function&lt;/A&gt;).&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 12:03:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-Why-is-predicted-probability-different-than/m-p/763823#M241910</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-08-25T12:03:12Z</dc:date>
    </item>
  </channel>
</rss>

