<?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: How to determine logistic regression formula from estimates output in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120790#M6331</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you getting your estimates from SAS to excel, a difference of .01 may be rounding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Feb 2013 19:06:06 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2013-02-26T19:06:06Z</dc:date>
    <item>
      <title>How to determine logistic regression formula from estimates output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120780#M6321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings all.&amp;nbsp; I am trying to create my regression forumula from the estimates output from proc logistic.&amp;nbsp; Thinking back to multiple regression (and it was several years ago), I could simply take the intercept + (estimate1*variable1) + (extimateN*variableN).&amp;nbsp; However, if I use this methodology, I seem to get some results that are counter intuitive.&amp;nbsp; My question is, how does the 'Exp(Est)' affect the parameter estimate with respect to putting it in the regression forumula?&amp;nbsp; I have attached a copy of my log, and sure would appreciate it if anyone would be willing to put some experienced eyes on it.&amp;nbsp; For example,&amp;nbsp; variable 'bad_debt_at_connection' indicates a customer opened a new account when they had an account that at some point in the past went to a collection agency for non-payment.&amp;nbsp; If I am trying to predict accounts that will go to collections, it seems to me if this condition were true for any customer, they would be more likely to go to collections if they have already done so in the past.&amp;nbsp; However, the parameter estimate of -0.1582 seems to me to indicate this is not the case.&amp;nbsp; The two class variables are binary, having either a 1 or 0.&amp;nbsp; The rest of the variables are numeric, and should be treated as such.&amp;nbsp; Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 16:56:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120780#M6321</guid>
      <dc:creator>gsnidow</dc:creator>
      <dc:date>2013-02-25T16:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine logistic regression formula from estimates output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120781#M6322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You didn't fit your model properly. You need to specify that you want your class variables to have referential coding not effect coding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try referring to this site to interpret your output and basics of logistic regression. A logistic regression isn't linear, so the way you're trying to write the equation isn't correct.&amp;nbsp; If you can find a statistician to help you out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 17:06:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120781#M6322</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-02-25T17:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine logistic regression formula from estimates output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120782#M6323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Reeza.&amp;nbsp; Unfortuneately, I do not have access to an in-house statustician, so I have been trying to figure it out on my own for several days now.&amp;nbsp; Below is what I am trying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc logistic data = credit.crnp_logreg;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class bad_debt_at_conn dep_unpaid;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model chg_off (event='1') = bad_debt_at_conn dep_unpaid cr_scor arrears qy_fc_c qy_fc_b qy_st_c qy_st_b / selection=none expb;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you be able to show me how to run it so it performs as you suggets, or to point me to a good reference?&amp;nbsp; I have tried googling everything I can think of.&amp;nbsp; Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 17:19:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120782#M6323</guid>
      <dc:creator>gsnidow</dc:creator>
      <dc:date>2013-02-25T17:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine logistic regression formula from estimates output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120783#M6324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://www.ats.ucla.edu/stat/sas/seminars/sas_logistic/logistic1.htm" title="http://www.ats.ucla.edu/stat/sas/seminars/sas_logistic/logistic1.htm"&gt;Statistical Computing Seminars: Introduction to SAS proc logistic&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I'm working on a new proc what I like to do is first try it out with the example data and make sure I understand how to interpret it for the example data. Then go back and make sure I understand it for my data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS has a bunch of examples in the documentation that is pretty good. The link above from UCLA is good. You can also try googling proc logistic at lexjansen.com. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My main suggestion is to add /param=ref; to your class statement like below.&amp;nbsp; You may also want to specify what reference levels you want it coded it but that's up to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc logistic data = credit.crnp_logreg;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class bad_debt_at_conn dep_unpaid/param=ref;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model chg_off (event='1') = bad_debt_at_conn dep_unpaid cr_scor arrears qy_fc_c qy_fc_b qy_st_c qy_st_b / selection=none expb;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 17:23:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120783#M6324</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-02-25T17:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine logistic regression formula from estimates output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120784#M6325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reeza, thank you so, so much for that link.&amp;nbsp; That is *exactly* what I need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 19:55:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120784#M6325</guid>
      <dc:creator>gsnidow</dc:creator>
      <dc:date>2013-02-25T19:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine logistic regression formula from estimates output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120785#M6326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I am still missing something.&amp;nbsp; I used / rsq lackfit, to see if my model even made sense, and indeed it is a good fit.&amp;nbsp; I guess what I am missing is that SAS must be using some kind of formula to determine the probability of each observation having a response of either 0 or 1.&amp;nbsp; I am still unsure how to do this.&amp;nbsp; Do I need to look at the probability of each variable independently, the put them all together?&amp;nbsp; Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 14:58:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120785#M6326</guid>
      <dc:creator>gsnidow</dc:creator>
      <dc:date>2013-02-26T14:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine logistic regression formula from estimates output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120786#M6327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm confused as to what your question is, what do you need to put them together for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see the basic calculations P(x=0) and P(x=1) in the output dataset if you're looking for that. Take a look at the 'Pred' dataset. If you want to figure out how to calculate those by hand its also possible, and a good exercise when starting out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the remission data in the first example in the SAS documentation:&lt;/P&gt;&lt;P&gt;proc logistic data=Remission outest=betas covout;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; model remiss(event='1')=cell smear infil li blast temp ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; output out=pred p=phat lower=lcl upper=ucl&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; predprob=(individual crossvalidate);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print data=pred;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 16:09:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120786#M6327</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-02-26T16:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine logistic regression formula from estimates output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120787#M6328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reeza, thank you so much for continuing to answer my newbie questions.&amp;nbsp; I ran my model with the output as you have shown above, and I am googling madly to find help in deciphering the results.&amp;nbsp; In the mean time, perhaps an explanation of what I am needing to do would help.&amp;nbsp; Using historical account data, with a binary response, two binary predictors, and several interval predictors, I need to come up with a formula to predict which accounts will ultimately not pay, and end up being sent to collections.&amp;nbsp; The system housing the data is a DB2 mainframe, and the DB2 programmers need to have a formula to sort the bad accounts having the highest probability of ending up in collections.&amp;nbsp; They have, in a DB2 table, all of the variables in my SAS model, but they need a formula to calculate the probability any account will end up in collections.&amp;nbsp; So, while it helps me to see the predicted probability of each observation in my dataset, I am needing to be able to figure out how to calculate that probability by hand, so I can give the mainframers a formula.&amp;nbsp; I hope this helps explain my dilema.&amp;nbsp; Thank you again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 16:35:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120787#M6328</guid>
      <dc:creator>gsnidow</dc:creator>
      <dc:date>2013-02-26T16:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine logistic regression formula from estimates output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120788#M6329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="132270" __jive_macro_name="message" class="jive_macro jive_macro_message" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 16:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120788#M6329</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-02-26T16:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine logistic regression formula from estimates output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120789#M6330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reeza, thank you for the link.&amp;nbsp; That is *exactly* what I am trying to do.&amp;nbsp; I've got close, but can't seem to get it exactly right.&amp;nbsp; I have my spread sheet set up just like the poster in the other post has done, with the MLE estimates populated above the variable names.&amp;nbsp; the closest I could get to calculating the individual probability of any one observation, and this is attempting to use the forumula you suggested to the other poster...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1/(1 + EXP(-1*(var_1*estimate_1)+(var_2*estimate_2)+(varN*estimate_N)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value calculated with this formula is slightly different (with an absolute difference less than .01) than the 'Individual Probability of event=1' value calculated by SAS.&amp;nbsp; I'm also not sure where the intercept fits in.&amp;nbsp; I found this document... &lt;A href="http://support.sas.com/resources/papers/proceedings12/317-2012.pdf"&gt;http://support.sas.com/resources/papers/proceedings12/317-2012.pdf&lt;/A&gt; and it seems to imply the intercept need not be taking into consideration in some cases.&amp;nbsp; Do you see anything wrong with my forumula?&amp;nbsp; Again, thank you so much for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 18:20:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120789#M6330</guid>
      <dc:creator>gsnidow</dc:creator>
      <dc:date>2013-02-26T18:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine logistic regression formula from estimates output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120790#M6331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you getting your estimates from SAS to excel, a difference of .01 may be rounding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 19:06:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120790#M6331</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-02-26T19:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine logistic regression formula from estimates output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120791#M6332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm right clicking the dataset, then chosing export.&amp;nbsp; It seems to be keeping the precision as is in the SAS dataset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 19:30:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120791#M6332</guid>
      <dc:creator>gsnidow</dc:creator>
      <dc:date>2013-02-26T19:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine logistic regression formula from estimates output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120792#M6333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I check one, I get the probabilities equivalent to .0001 in Excel.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Close enough for me. However, you may want to ensure that you've done the parametrization correctly in terms of implementing the equation. That's the only think I can think of without seeing the results and equations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 19:52:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120792#M6333</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-02-26T19:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine logistic regression formula from estimates output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120793#M6334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reeza, I took your advice, and started over with a documented example I understood.&amp;nbsp; I looked at the Neuralgia example 51.2 avalailable at &lt;A href="http://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_logistic_sect060.htm"&gt;http://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_logistic_sect060.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started by altering the data a bit to match my scenario by changing 'M' and 'F' to 0 and 1, and also to change 'No' and 'Yes' to 0 and 1.&amp;nbsp; Other than that, it pretty much seems the same as my situation, with the exeption that I have 3 binary class predictors, and 3 numeric predictors.&amp;nbsp; I tried using the same forumula that got me close yesterday on my own data, and now I am not even coming close, as all of the results of my formula are .9999 when rounded.&amp;nbsp; I have attached the sas code for the example, including my changegs, the proc logistic, and a final dataset with the current iteration of the formula I am trying to get to work.&amp;nbsp; It just seems like I should be able to replicate the predicted probabilities given the estimates and intercept, but after trying everything I can think of, I just can't get it to work.&amp;nbsp; I have referenced my stats book, and I don't see anything contrary to what you have suggested in the other post, and what I am trying.&amp;nbsp; Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 20:34:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120793#M6334</guid>
      <dc:creator>gsnidow</dc:creator>
      <dc:date>2013-02-27T20:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine logistic regression formula from estimates output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120794#M6335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The intercept does matter. &lt;/P&gt;&lt;P&gt;I pulled the exact estimates from the model instead of typing it it. But if you type it in, it's pretty close. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc logistic data=Neuralgia2 outest=sample;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; class sex (ref='0') / param=ref ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; model Pain (event='1') = age sex ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; output out=pred p=phat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; predprob=(individual crossvalidate) ;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;P&gt;/* the formula I am trying to replicate in Excel is the 'myformula' variable &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; in the below data set&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;&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;&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;&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;&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; */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data logformula (keep= age sex pain ip_1 myformula difference);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set pred; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if _n_=1 then set sample (keep = intercept age sex1 rename = (age=age_estimate sex1=sex_estimate));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; length sex_estimate age_estimate intercept myformula 8. ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; myformula = 1/(1+exp(-1*(intercept+(sex_estimate*sex) + (age_estimate*age)))); *&amp;lt;&amp;lt;&amp;lt; can't get this to match ip_1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; difference=phat-myformula;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; format difference 12.8;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=logformula (obs=25) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var sex age pain ip_1 myformula ; * I need to be able to replicate ip_1 given MLE values;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 20:51:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120794#M6335</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-02-27T20:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine logistic regression formula from estimates output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120795#M6336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reeza, I only typed in the estimates because I did not know how to get them directly.&amp;nbsp; The problem I have is that I am unable to figure out the formula to calculate the probability given the estimates.&amp;nbsp; I need to hand off a formula to be applied to data outside of SAS, on a mainframe.&amp;nbsp; In the output, the 'myformula'&amp;nbsp; in your code is still not matching the predicted probability ip_1.&amp;nbsp; Did I miss something?&amp;nbsp; Thank you so much for all of your good time and help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 21:02:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120795#M6336</guid>
      <dc:creator>gsnidow</dc:creator>
      <dc:date>2013-02-27T21:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine logistic regression formula from estimates output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120796#M6337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Really? Did you run the code I provided above, the differences in mine was 0.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula is then 1/exp( ) part that you hand off to the developers, or the my formula part.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 21:10:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120796#M6337</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-02-27T21:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine logistic regression formula from estimates output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120797#M6338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DOH! a thousand times.&amp;nbsp; Yes, Reeza, you are correct.&amp;nbsp; I got an error when I ran your code, telling me WORK.SAMPLE.DATA does not exist.&amp;nbsp; So, what I was really looking at was the results from the last time I ran my faulty code.&amp;nbsp; I just re-wrote the formula as you have it, and VOILA!.&amp;nbsp; Thank you so, so much.&amp;nbsp; I'm confused though, in why the intercept needs to be included in the formula when it does not matter.&amp;nbsp; Again, thank you for the help, and I realize now I could have made it easier on you in the first place if I had just left Excel out of it, and done the entire thing in SAS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 21:43:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/m-p/120797#M6338</guid>
      <dc:creator>gsnidow</dc:creator>
      <dc:date>2013-02-27T21:43:39Z</dc:date>
    </item>
  </channel>
</rss>

