<?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 returning different parameters in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-returning-different-parameters/m-p/596608#M29068</link>
    <description>Have? X? Doesn't run for me.</description>
    <pubDate>Tue, 15 Oct 2019 17:43:27 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-10-15T17:43:27Z</dc:date>
    <item>
      <title>Proc Logistic returning different parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-returning-different-parameters/m-p/596590#M29043</link>
      <description>&lt;P&gt;I provided the data from the following function to Proc Logistic:&lt;/P&gt;&lt;P&gt;P = 1 / [ 1 + e^(- 0.005 * x) ]&lt;/P&gt;&lt;P&gt;Sigmoid probability distribution has the following form:&lt;/P&gt;&lt;P&gt;P(event) = 1 / [ 1 + e^( - (a + bx) ], where x is the predictor variable.&lt;/P&gt;&lt;P&gt;Therefore,&lt;FONT color="#FF0000"&gt; a = 0 &lt;FONT color="#000000"&gt;and&lt;/FONT&gt; b = 0.005.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Then, I simulated binary response values as follows:&lt;/P&gt;&lt;P&gt;if P &amp;gt;= 0.6 then y = 1; else y = 0.&lt;/P&gt;&lt;P&gt;I used Proc Logistic to model y( event = '1') = x.&lt;/P&gt;&lt;P&gt;The Logistic procedure confidently returned the following parameters:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;a = -182.5&lt;/FONT&gt; and &lt;FONT color="#FF0000"&gt;b = 2.2401&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;Why are they different from what I provided?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 17:12:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-returning-different-parameters/m-p/596590#M29043</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2019-10-15T17:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic returning different parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-returning-different-parameters/m-p/596595#M29044</link>
      <description>Show your work please.</description>
      <pubDate>Tue, 15 Oct 2019 17:21:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-returning-different-parameters/m-p/596595#M29044</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-15T17:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic returning different parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-returning-different-parameters/m-p/596605#M29063</link>
      <description>&lt;P&gt;Thank you, here is the code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
set have (keep=x);
P = 1/(1+2.71828182846**(-0.005*x)); 
if P &amp;gt;= 0.6 then y = 1;
else y = 0;
drop P;
run;

proc logistic data=have alpha=0.05
	plots(only)=(effect oddsratio);
	model y(event='1')=x/clodds=pl;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Oct 2019 17:34:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-returning-different-parameters/m-p/596605#M29063</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2019-10-15T17:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic returning different parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-returning-different-parameters/m-p/596608#M29068</link>
      <description>Have? X? Doesn't run for me.</description>
      <pubDate>Tue, 15 Oct 2019 17:43:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-returning-different-parameters/m-p/596608#M29068</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-15T17:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic returning different parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-returning-different-parameters/m-p/596612#M29069</link>
      <description>&lt;P&gt;One difference is you'll need to specify the NOINT option to fit a model without intercept.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;EDIT (added):&lt;/P&gt;
&lt;P&gt;What are you trying to do overall here that you need. If it's to fit an exponential model, there are other methods to do that, PROC UNIVARIATE for example. I'm guessing how the 0/1 is being assigned doesn't align with logistic regression somehow but can't remember enough of the math to say why.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 18:01:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-returning-different-parameters/m-p/596612#M29069</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-15T18:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic returning different parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-returning-different-parameters/m-p/596617#M29072</link>
      <description>&lt;P&gt;After using NOINT,&amp;nbsp; b = 0.002. This is pretty good, considering that I had to taint the probability distribution a little to avoid the perfect prediction, which prevented the model from converging.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 18:03:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-returning-different-parameters/m-p/596617#M29072</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2019-10-15T18:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic returning different parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-returning-different-parameters/m-p/596661#M29073</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/235176"&gt;@pink_poodle&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;is right in that "&lt;SPAN&gt;how the 0/1 is being assigned doesn't align with logistic regression." You missed the (crucial) randomness in the assignment:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;y=rand('bern',P);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Actually, you don't need to create a variable P (you drop it anyway), nor type the digits of &lt;EM&gt;e&lt;/EM&gt;&amp;nbsp;or the formula of the logistic function. Simply define&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;y=rand('bern',logistic(0.005*x));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then, you may decide not to use the NOINT option and let&amp;nbsp;&lt;EM&gt;PROC LOGISTIC&lt;/EM&gt; find out -- input data permitting -- that the intercept (parameter &lt;EM&gt;a&lt;/EM&gt;) must be (close to) zero. The results are likely similar &lt;EM&gt;with&lt;/EM&gt; the NOINT option because, of course, &lt;EM&gt;a is&lt;/EM&gt; zero&amp;nbsp;(but you know &lt;EM&gt;b&lt;/EM&gt;=0.005 in advance as well, so this shouldn't be the only reason for using NOINT).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: Use &lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0gw58qo85qp56n1kbpiz50ww8lv.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank" rel="noopener"&gt;CALL STREAMINIT&lt;/A&gt; in the DATA step using the RAND function in order to create reproducible results.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 21:17:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-returning-different-parameters/m-p/596661#M29073</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2019-10-15T21:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic returning different parameters</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-returning-different-parameters/m-p/596910#M29076</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using your method,&amp;nbsp;y = rand('bern',logistic(0.005*x)),&lt;/P&gt;&lt;P&gt;without NOINT option: intercept = 0.00160, slope = 0.00492;&lt;/P&gt;&lt;P&gt;with NOINT option: slope&amp;nbsp; = 0.00494.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2019 14:27:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Logistic-returning-different-parameters/m-p/596910#M29076</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2019-10-16T14:27:15Z</dc:date>
    </item>
  </channel>
</rss>

