Logistic Regression Using Excel


Predict who survives the Titanic disaster using Excel.

Logistic regression allows us to predict a categorical outcome using categorical and numeric data. For example, we might want to decide which college alumni will agree to make a donation based on their age, gender, graduation date, and prior history of donating. Or we might want to predict whether or not a loan will default based on credit score, purpose of the loan, geographic location, marital status, and income. Logistic regression will allow us to use the information we have to predict the likelihood of the event we’re interested in. Linear Regression helps us answer the question, “What value should we expect?” while logistic regression tells us “How likely is it?”

Given a set of inputs, a logistic regression equation will return a value between 0 and 1, representing the probability that the event will occur. Based on that probability, we might then choose to either take or not take a particular action. For example, we might decide that if the likelihood that an alumni will donate is below 5%, then we’re not going to ask them for a donation. Or if the probability of default on a loan is above 20%, then we might refuse to issue a loan or offer it at a higher interest rate.

How we choose the cutoff depends on a cost-benefit analysis. For example, even if there is only a 10% chance of an alumni donating, but the call only takes two minutes and the average donation is 100 dollars, it is probably worthwhile to call.

Nguồn: https://tongcucthuevietnam.com

Xem thêm bài viết khác: https://tongcucthuevietnam.com/tong-hop


  1. This is pretty gnarly stuff. Powerful stuff. Thanks for posting! Wonderful little tool for a small business owner; you can model a response rate to a marketing campaign and use this to quantify your Return On Marketing Investment (ROMI). (!) 👍

  2. When I go to run a Binary Logistic Regression using this Pack I keep getting an alert saying that the "Summary Table must have at least two data rows" but my input data does have two rows and I am not inputing summary data, I'm inputing raw data. Can anyone help me figure this out?

  3. For a vastly easier way to fit logistic regression models in Excel, with highly interactive output worksheets, try RegressItLogistic, a free add-in. Visit https://regressit.com to obtain the software and documentation and see https://regressit.com/titanic-example.html for detailed walk-through of the Titanic example. RegressItLogistic is completely menu-driven and produces more detailed and better designed output than you will get with just about any other logistic regression software. Most of the tables and charts have interactive features that allow you play with parameters such as the cutoff level after fitting a model in order to see what happens to classification performance–very good for teaching or demonstrating the complex properties of logistic models and performing sensitivity analysis. The program also contains an interface with R that allows logistic models to be fitted in R via a menu interface in Excel, with customized table and chart output, which opens up more possibilities for fitting large models and performing a variety of testing. This feature does not require writing code and can be used by anyone. RegressItLogistic also includes many features to aid instructors, such as built-in teaching notes and support for auditing student work and carrying out grading on a large scale. Give it a try, whether you are a practitioner or a student or a teacher.

  4. would it not be more correct to split the 'class' in to 3 dummy variables 'first', 'second' and 'third' so that the effects can be evaluated individually?

    same for sex

    can someone explain the difference in leaving them as discrete variables vs using dummy variables?

  5. How can I check and train my remaining data to understand that the model prepared here is giving us the right result?

  6. The Most important thing is Before open xlam, you should make sure that you checked the "Solver Function"
    and than close the excel , finally open it from dialog . I also barely fix the Problem with "Password thing"

    In site you can check this words "Most important, remember that Solver must be installed.
    To check this, press Alt-TI and make sure that Solver (as well as RealStats) is on the list of addins with a check mark next to it. "

  7. Hi, Ive used this method to generate a good predictive model on a training dataset. How do I now apply this model to a test dataset and see what it would predict? ( Ie I dont have the values of the DV but I have all other independent variables)

  8. Does the add-in include marginal effects? Since coefficients do not equal marginal effects in logistic regression, that's a critical output. Also how about pseudo r-square? Obviously traditional r square mean nothing…

  9. Hi! Ive downloaded and installed the real statistics tool pack for excel 2016 so my selection window, in video at 3,32mins, looks different and im having problems understanding what option to choose. In the category of logistic regression i have 'binary and Probit logistic regression' and 'multinomial logistic regression' to choose from?

  10. Thank you for the detailed explanation. very helpful.

    But I alsos have a question?

    I was able to replicate the steps and get similar results. How do you explain row number 549 that has 2 Success counts, 1 Failure count. totalling upto 3.

    Is it possible?

    PLese help.


  11. When trying to add RealStat Add-on in Excel – Its asking for RealStat Password. So what is the password for RealStat Add-on to get added into my Excel 2016.

  12. On my logistic regression homework, I have to find the coefficient for moderate, conservative, age, economy president, widowed, and non Hispanic black. The columns are those coefficients, B, S.E., wald, df, sig, and exp(B). How do I find the logistic regression for those coefficients (moderate, conservative, economy president, age, widowed, and nonhispanic black using excel?

  13. I am getting error:"Compilation Error in Hidden Module " when I want to run logistic regression. How can i sort out this error?

  14. I have downloaded the real statistics tool pack but I cant see logistic regression. Please confirm if its the same as binary regression under regression.

  15. can you do the same thing for like a correlation? sorry i am really helpless idk what to do with my thesis!! thanks!

  16. Hi Lucas,

    I've used your excellent add-on to predict market movements based upon data I've recorded. As expected, my parameters offered little predictive qualities, oh well.

    I then decided to try and prove to myself the power of this method of regression. I created a two column data set (200 rows). The first column contained a random number between 0 and 100, my predicted value was set as 1 if the random number was greater than 75, otherwise 0. I expected the tool to be able predict with a high probability that numbers over 75 are predictive of the value being 1.

    When I ran the Binary Logistic Regression, I got all values in the output tables set to #VALUE! any idea where I have gone wrong ?


  17. This was so helpful! Thank you. I followed all your instructions, but for some reason, 4 columns of my data on the "new" sheet became 0. Is this normal? Also, my ROC Curve ended up as a diagonal line. I'm not sure what I'm doing wrong.

  18. Can you please post a follow up video that explains the rest of the results . I am using logistic regression to predict if a patient would be readmitted to a hospital given some variables. How would I apply the results to a
     given patient. Thanks


Please enter your comment!
Please enter your name here