Logistic regression models – practice problems


Logistic regression models – practice problems

Author
Message
NEAS
Supreme Being
Supreme Being (5.9K reputation)Supreme Being (5.9K reputation)Supreme Being (5.9K reputation)Supreme Being (5.9K reputation)Supreme Being (5.9K reputation)Supreme Being (5.9K reputation)Supreme Being (5.9K reputation)Supreme Being (5.9K reputation)Supreme Being (5.9K reputation)

Group: Administrators
Posts: 4.5K, Visits: 1.6K

MS Module 15 or 21: Logistic regression models – practice problems

(The attached PDF file has better formatting.)

[Logistic regression is in module 15 for the 2nd edition of the text and module 21for the 3rd edition of the text. The text reading is the same in the two editions. The 3rd edition of the text has additional material on logistic regression that is not on the syllabus for this course.]

Exercise 15.1: Logistic regression

A probability Y is related to the independent variable X by logistic regression:

    Y = p(x) = exp(β0 + β1 x) / (1 + exp(β0 + β1 x) )

●    When X = 7, the probability Y is 20%.
●    When X = 8, the probability Y is 25%.

A.    At X = 7, what is the odds ratio of Y?
B.    At X = 8, what is the odds ratio of Y?
C.    At X = 11, what is the odds ratio of Y?
D.    At X = 11, what is the probability of Y?

Part A: The odds ratio of Y at x = 7 is 20% / (1 – 20%) = 0.2500.

Part B: The odds ratio of Y at x = 8 is 25% / (1 – 25%) = 0.3333.

Part C: The slope parameter β1 is the change in the log odds for a 1-unit increase in x, so the odds ratio itself changes by the multiplicative factor exp(β1) when x increases by 1 unit. This factor is

    0.333333 / 0.25 = 1.33333

11 is 3 units more than 8, so the odds ratio of Y at x = 11 is 0.333333 × 1.3333333 = 0.79012

Part D: If Y = the probability and R = the odds ratio, R = Y / (1–Y) ➾ Y = R / (1+R).

The probability is the odds ratio / (1 + odds ratio), so the probability of Y at x = 11 is

    0.79012 / 1.79012 = 44.14%

Exercise 15.2: Logistic regression

A statistician uses a logistic regression model:

●    The independent variable X is a quantitative predictor.
●    The dependent variable Y is 1 if the observation is a success and 0 otherwise.

The estimate of β1 is –0.20.

The odds of success at X = 1 are 50%.

A.    What is the probability of success at X = 1?
B.    What are the odds of success at X = 3?
C.    What is the probability of success at X = 3?
D.    What are the odds of success at X = 0?
E.    What is the probability of success at X = 0?
F.    What is β0?

Part A: If the probability of success is P, the odds of success are P/(1-P).

Given that P/(1-P) = 50%, P = ½ – ½P ➾ P = ⅓.

The formula is probability = odds / (1 + odds) = 50% / (1 + 50%) = 0.3333

Part B: For each one unit increase in X, the odds of success increase by a factor exp(1) = e–0.20 = 0.81873

3 is 2 units more than 1, so the odds of success at X = 3 are 50% × 0.818732 = 0.335159

Part C: P/(1-P) = 0.33516 ➾ 1.33516 P = 0.33516 ➾ P = 0.33516 / 1.33516 = 0.25103

Part D: 0 is 1 unit less than 1, so the odds of success at X = 0 are 50% / 0.81873 = 0.610702

Part E: The probability of success at X = 0 is 0.610702 / 1.610702 = 0.379153

Part F: For logistic regression, Y = exp(β0) / (1 + exp(β0 + β1 × X) ).

If Y = 0.379153 at X = 0, then exp(β0) / (1 + exp(β0) ) = 0.379153 ➾

(1 – 0.379153) × exp(β0) = 0.379153 ➾

exp(β0) = 0.379153 / (1 – 0.379153) = 0.610703

β0 = ln(0.610703) = –0.49314


Attachments
GO
Merge Selected
Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

  • Login with twitter
  • Login with twitter
Select a Forum....













































































































































































































































Neas-Seminars

Search