Logistic Regression

maryjkluther23

New Member
Let’s consider the logistic regression model, which we will refer to as Model 1, given by
log(pi / [1-pi]) = 0.25 + 0.32*X1 + 0.70*X2 + 0.50*X3
In the above formula, X3 is an indicator variable with X3=0 if the observation is from Group A and X3=1 if the observation is from Group B.

(1) For X1=2 and X2=1 compute the log-odds for each group, i.e. X3=0 and X3=1.
(2) For X1=2 and X2=1 compute the odds for each group, i.e. X3=0 and X3=1.
(3) For X1=2 and X2=1 compute the probability of an event for each group, i.e. X3=0 and X3=1.

(4) Use the odds that you found in QUESTION 2 to compute the relative odds of Group B to Group A. How does this number compare to the result in Question #5. Does this make sense?

(5) Using the equation for Model 1, compute the relative odds associated with X3, i.e. the relative odds of Group B compared to Group A.

I made a start below. Thanks

1) If we set X1=2 and X2 = 1, then logit_Y = 0.25 + 0.64 + 0.7 + 0.5*X3 = 1.59 + 0.5*X3
If we set X3 = 0, logit is then 1.59. For X3=1, logit is 2.09. And the log-odds then: 1.59/2.09 = 0.7608

2) We can remove the log of the answer in part 1, to compute the odds instead of the log-odds. That is, via the exponential: e^(0.7608) = 2.14

CowboyBear

Super Moderator
Sorry for the delay releasing your post - it was caught in our spam filter for some reason.

rogojel

TS Contributor
hi,
the definition of odds is p/(1-p) so the formula directly computes the log odds.

regards