1 / 30

Logistic Regression

Logistic Regression. Richard Rivera (aka Rico). Adapted from Scott Yabiku’s Lecture for SOC 507. Overview. Purpose of Logistic Regression Likelihood Probability of an event Odds of an event occurs vs not occuring Odds - Ratio. Why do you need Logistic Regression?.

jasper
Télécharger la présentation

Logistic Regression

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Logistic Regression Richard Rivera (aka Rico) Adapted from Scott Yabiku’s Lecture for SOC 507

  2. Overview • Purpose of Logistic Regression • Likelihood • Probability of an event • Odds of an event occurs vs not occuring • Odds - Ratio

  3. Why do you need Logistic Regression? • Predict the likelihood of discrete outcomes • Group membership • Binary outcome (disease/no disease) • Quite Flexible Statistical Assumptions • No assumptions about the distributions of the predictor variables. • Predictors do not have to be normally distributed • Does not have to be linearly related. • Does not have to have equal variance within each group.

  4. Likelihood of Dichotomous Outcomes • Binary dependent variables (0, 1) have two possible outcomes (e.g., success & failure) • Success (y = 1); failure (y = 0). • Goal is to estimate or predict the likelihood of success or failure, conditional on a set of independent variables.

  5. Likelihood of Dichotomous Outcomes • p • Odds • Odds Ratio

  6. What is p? • p = probability (or proportion)

  7. What is p? • p = probability (or proportion) • The lower bound is 0, and the upper bound is 1. • Probability of success: Pr(y = 1) = p • Probability of failure: Pr(y = 0) = 1 – p

  8. What is the p of success or failure?

  9. What is the p of success or failure?

  10. What is the p of success or failure?

  11. What is the p of success?

  12. What is the p of success?

  13. What are odds? • Odds are related to probabilities • The odds of an event occuring is the ratio of the probability of that event occurring to the probability of the event not occuring. • Odds of success = p of success divided by p of failure • omega (ω) = p/(1-p)

  14. What are the odds of success? • omega (ω) = p/(1-p) • ω = .75/ (1 - .75) • ω = .75/.25 = 3

  15. What is an odds ratio? • The odds ratio compares the odds of success for one group to another group. • Theta (θ) = ωgroupA = pA/(1-pA) ωgroupB pB/(1-pB)

  16. How can we compare the odds (ω) of males versus females

  17. How can we compare the odds (ω) of males versus females

  18. How can we compare the odds (ω) of males versus females

  19. How can we compare the odds (ω) of males versus females

  20. How can we compare the odds (ω) of males versus females • ωgroupA = pA/(1-pA) • ωgroupB = pB/(1-pB)

  21. How can we compare the odds (ω) of males versus females • ωmale = .67/.33 • ωfemale = .83/.17

  22. How can we compare the odds (ω) of males versus females • ωmale = .67/.33 = 2.03 • ωfemale = .83/.17 = 4.88 • Theta (θ) = ωgroupA / ωgroupB

  23. How can we compare the odds (ω) of males versus females • Theta (θ) = ωgroupA/ ωgroupB • ωmale / ωfemale = 2.03 / 4.88 • ωmale / ωfemale = .4160 • The odds that males succeeds compared to females are only .416 times that of females

  24. How can we compare the odds (ω) of males versus females • How about θ = ωgroupB/ ωgroupA • ωfemale / ωmale = 4.88 / 2.03 = 2.404 • The odds that females succeeds compared to the odds that males succeeds are 2.40 times that of males (or, 2.40 times greater). • Or, you could say the odds for females are 218% greater. • Take the odds ratio and subtract 1.

  25. What is so special about 1 • Take the odds ratio and subtract 1. • What’s so special about 1? 1.00 is the null effect—when the odds ratio is 1.00, there is no difference in the odds for one group relative to the other. • So when we describe odds ratios, we often describe them by how much they differ from 1.00

  26. Why is it called “Logistic” regression? • It uses the logit transformation. • The logistics transformation can be interpreted as the logarithm of the odds of success vs. failure.

  27. Lets go through an example

  28. What are the odds of favoring gun permits? What are the odds that a male respondent favors gun permits? What is the odds ratio for a male favoring gun permits compared to a female? What is the log odds ratio for a male favoring gun permits compared to a female?

  29. Lets run it in SPSS • 1st, I recommend that you recode any binary variables into new variables with categories 0 and 1. • Transform > Recode > into a different variable • Subsequently: Analyze > Regression > Binary Logistic

  30. Example Output

More Related