I am trying to interpret an interaction effect that was modeled using melogit in Stata 14.2. After the initial model, I ran a margins command and marginsplot command to graph the interaction. Then I ran a margins command to try to interpret the "simple slopes" (or re-centered predictors). It seems that the follow-up commands are very sensitive to how they are specified, which makes me think that I must not be interpreting something correctly. See the different coding used:
Regarding the graph: I have attached the graph that Stata generates. Stata appears to be graphing the marginal mean (according to the y-axis title). Are these the probabilities? The actual values *look* like probabilities (i.e., they range from .06 to .35 or so). I have tried manually calculating the logged odds by taking the values from the original equation, substituting in low and high values for anxiety (-0.5 and 0.5) and values for time (0, 1, 2). Then I tried exponentiating them to get the odds. Then I've used exp(xb)/(1+exp(xb)) to get the probabilities. None of these values match the graph that I am getting from Stata (logged odds range from -4.61 to -1.56, odds range from .010 to .233, and probabilities range from .010 to .189). I also get very different graphs from Stata if I specify predict(xb) at the end of the margins command immediately prior to the marginsplot command (see second graph).
Regarding the simple slopes: the default is the marginal predicted mean. It appears that I am obtaining a probability? If I request predict(xb), I get very different values with very different significance levels. The exp(predict(xb)) option returns the exact same values as the predict(xb) option. If I manually exponentiate those values or use the formula exp(xb)/(1+exp(xb)) to manually turn those values into probabilities, they don't match the values from the default output. I suppose I could just report the probabilities that Stata is giving me, but I am accustomed to reporting the ORs (i.e., the exponentiated logged odds) for my simple slopes. I don't understand how to interpret probabilities in this way, particularly when they are negative. And of course, I'd still rather understand what is going on.
Code:
melogit symp_bin i.gender c.time##c.cT1anx || sub: time estat ic melogit, or margins, at(time=(0 1 2) cT1anx=(-0.5 0.5)) marginsplot, noci xlabel(0 1 2) ylabel(0(.1).5) name(symptoms, /// replace) title("") note("Symptoms as a function of Initial Anxiety X Time") /*Estimate the significance of the time-symptom association at different levels of anxiety*/ margins, at(cT1anx=(-0.5 0.5)) dydx(time) margins, at(cT1anx=(-0.5 0.5)) dydx(time) predict(xb) margins, at(cT1anx=(-0.5 0.5)) dydx(time) exp(predict(xb))
Regarding the simple slopes: the default is the marginal predicted mean. It appears that I am obtaining a probability? If I request predict(xb), I get very different values with very different significance levels. The exp(predict(xb)) option returns the exact same values as the predict(xb) option. If I manually exponentiate those values or use the formula exp(xb)/(1+exp(xb)) to manually turn those values into probabilities, they don't match the values from the default output. I suppose I could just report the probabilities that Stata is giving me, but I am accustomed to reporting the ORs (i.e., the exponentiated logged odds) for my simple slopes. I don't understand how to interpret probabilities in this way, particularly when they are negative. And of course, I'd still rather understand what is going on.
Comment