0
$\begingroup$

enter image description here

I need help interpreting the results of a logit model. I have my code here for interpreting the odds ratio and partial effects of my model. I am able to interpret the results using continuous data, but I struggle with interpreting the model with categorical, like Schools, data. Any help is much appreciated. Thank you so much in advance!

$\endgroup$
  • $\begingroup$ How do you interpret the coefficients for the continuous predictors? How would you interpret the coefficients for the categorical predictors if this were a linear model instead of logistic? $\endgroup$ – Dave Jan 13 at 19:47
  • 1
    $\begingroup$ For the odds ratio I would say something along the lines of.... Holding other variables constant, when X increases by one unit, it is (a number) times more likely on Y. In other words, the odds of Y, as opposed to not Y, are (a number) - 1 higher than X increases by one unit. $\endgroup$ – afrketic Jan 13 at 19:51
  • $\begingroup$ Now how would you interpret the categorical variable coefficients in a linear regression? $\endgroup$ – Dave Jan 13 at 19:58
  • $\begingroup$ I'm not entirely sure but I would say something along the lines of.... Group X1 is the average difference in Y when X1 = 0. $\endgroup$ – afrketic Jan 13 at 20:12
0
$\begingroup$

There are a few things going on here. Firstly, you talk about odds ratios but the first chunk of output looks like it's giving logit coefficients, not odds ratios. However, this is actually fine it's easier to understand what's going on here with coefficients and odds ratios not actually that helpful in interpreting logit models.

Second, we should make sure you understand how to understand regression coefficients in general. in basically all forms of regression analysis a the coefficient for variable X tells you "what happens" when X increased by one "unit" while all other variables are held constant. So if you have a dummy variable for "female" then the coefficient tells you the impact of going from 0 (male) to 1 (female), but if you have a continuous variable "age" it tells you the impact of adding one year to age. I don't know how your "school" variables are coded but usually the way we treat categorical variables like "school" are to create a set of binary dummy variables for each school and include all but one of them in the model - with the left out school treated as the "reference category," so all the other dummy variables tell you the impact of being at that school as opposed to the reference school.

Third, with a logit model there is no simple, intuitive way of quantifying the "impact" of a variable without some extra work, because the model is nonlinear. For a given variable you probably want to know "if X increased by 1 unit the probability of Y increased by NN%" this is known as the "risk ratio." But because the logit model is nonlinear, you can't calculate a risk ratio without knowing what the baseline probability of Y was to begin with. The same "coefficient" might correspond to a 20% or a 5% increase in the probability of Y depending on what Y was to begin with (odds ratios don't solve this problem, in effect they just assume that the baseline probability is zero). The "marginal effects" you asked for are one way or resolving this issue. What they do is hold all the variables in the model at their mean values and ask the model to calculate the probability of Y at those levels. Then, for each variable they tell you how much the probability of Y would change if that variable increased by "a bit." Now, in this particular case it looks like it's treating "a bit" as the instantaneous slope of the probability curve at that point. This kind of makes sense for continuous variables like age, but doesn't make sense for a binary variable. So the marginal effect for Prince (.17) tells you that when you hold all the other variables at their mean value and increase "Prince" by an infinitesimally small amount, the probability of Y is increasing by 17% at that point. But this is not very useful, because my guess is that "Prince" can only be 1 or 0. What you probably want is for it to calculate the impact of a one unit change in that variable - I'm not sure how to do this in Python though.

But some people (like me!) don't really like this method of "marginal effects at the mean" in general. There are other methods, like the similarly named "average marginal effect" or else the calculation of specific predicted probabilities, that are often more intuitive.

Here's a not-too-technical presentation discussing these issues regarding the interpretation of logit models in more details.

https://static1.squarespace.com/static/5f25d5c6074de0495c46ccec/t/5f28389e9526e63b9bca9215/1596471455418/week+13+margins.pdf

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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