1
$\begingroup$

I am taking a statistics course where we are learning about Logistic Regression.

In particular, we are learning about the relationship between the regression coefficients and the Odds Ratio. This article on Wikipedia (https://en.wikipedia.org/wiki/Logistic_regression) provides a good summary: "In simple terms, if we hypothetically get an odds ratio of 2 to 1, we can say... "For every one-unit increase in hours studied, the odds of passing (group 1) or failing (group 0) are (expectedly) 2 to 1 (Denis, 2019)."

I am trying to understand if this example can be extended to compare Odds Ratio for multiple variables.

For example, suppose the response variable is whether the student "Pass or Failed". And suppose we have information on the age, gender, whether the student had a tutor (yes/no) and the number of hours each student spent studying. I think in this case, the general model would appear as : log(p/1-p) = B_0 + B_1X1 + B_2X2 + B_3X3 + B_4X4 . Given the data, I could use some software like R or SAS to fit a Logistic Regression model to this data.

Suppose I am interested in finding out the effect on the odds of passing for each one-unit increase in hours studied for males with tutors vs. females without tutors. It is unclear to me as to how I can adapt the Odds Ratio formula to answer this question (or whether in general the Odds Ratio formula can be used to answer such a question).

Reading online, it seems that one thing I could do would be to create "interaction variables" - that is, instead of recording the gender of each student and whether the student has a tutor or not : I could also record both of these variables together into a single variable (e.g. male with tutor, male without tutor, female with tutor, female without tutor). Then perhaps I might be able to use the Odds Ratio formula as is - however, I am not sure if this approach is suitable.

But in any case, could someone please comment on how the Odds Ratio formula can be modified to calculate multiple comparisons?

$\endgroup$

1 Answer 1

4
$\begingroup$

It sounds like you want a model that would be represented as follows:

y ~ 1 + hours + gender_tutor + hours:geneder_tutor

gender_tutor is a 4-category categorical variable containing the gender by tutor combinations (male with tutor, male without tutor, female with tutor, female without tutor). It sounds like you want to see if the odds ratio of hours differs for males with tutors and females without tutors.

What you'll end up with is a ratio of odds ratios: the ratio of the odds ratio of hours for males with tutors and the odds ratio of hours for females without tutors. If that ratio is 1, then the two odds ratios are equal. More generally, interaction terms in logistic regression models represent ratios of odds ratios (i.e., once the coefficients have been exponentiated). They are not odds ratios; they are odds ratio ratios.

$\endgroup$
3
  • $\begingroup$ @ Noah: thank you so much for your answer! $\endgroup$
    – stats_noob
    Nov 23, 2022 at 23:39
  • $\begingroup$ Is this the only way to do this (i.e. through the the interaction variable)? Is it possible to do something like : exp(b0 + b1 + b2)/exp(bo+b3+b4)? or is this not correct? thank you so much! $\endgroup$
    – stats_noob
    Nov 23, 2022 at 23:42
  • $\begingroup$ There are many ways to parameterize a model that yield identical fit but imbue the coefficients with different interpretations. So depending on the parameterization, your expression could give the right estimate. You need to spell out what each of the coefficients means, though. $\endgroup$
    – Noah
    Nov 24, 2022 at 3:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.