Dear Statalist,
I am using Stata 12 blogit with an interaction term that has a positive coefficient (0.0047215), yet the average marginal effect is negative (-551.4792). I am not sure why this paradox occurs, so would appreciate any insights.
Note, the blogit command uses folded data, data that includes the number of 1's (the first variable) out of the number at risk in the population (the second variable), but results are same as logit command if data were unfolded with a 0-1 dependent variable. Hence, blogit is not the issue. I calculated the average marginal effect in excel, so it is working properly too.
A reason for the paradox may be that the population of the intervention county has a million people, while the rest of the state has 25 million. The margins command predicts a count of the number of 1's, but still, the signs of the blogit coefficent and the average marginal effect coefficient should be the same.
I realize that in a logistic regression model, the interaction effect of two interventions (in other words, the cross-derivative) does not equal the marginal effect of the interaction term (Ai & Norton, 2003). However, the difference-in-differences (DiD) interaction term included only a single intervention variable (that is, county 2 [c2]); therefore, the interaction effect equals the marginal effect of the DiD interaction term, because the interaction effect was identified from the DiD of the observed outcome under intervention minus the DiD of the potential outcome under nonintervention (Puhani 2012; Karaca-Mandic et al., 2012).
Here is the output:
. blogit a1111_d21aai PopRnd i.c2##i.year11_15
c2#year11_15 coeff = 0.0047215 (this is the coeff, not the odds ratio)
. margins if e(sample)==1, at(year11_15 = (0,1) c2 = (0,1)) coeflegend post
. lincom (_b[4._at] - _b[3._at]) - (_b[2._at] - _b[1._at])
coeff = -551.4792
Thanks,
Brent Fulton
Ai C, Norton EC: Interaction terms in logit and probit models. Economics Letters 80:123–129, 2003
Puhani PA: The treatment effect, the cross difference, and the interaction term in nonlinear “difference-in-differences” models. Economics Letters 115:85–87, 2012
Karaca-Mandic P, Norton EC, Dowd B: Interaction terms in nonlinear models. Health Services Research 47:255–274, 2012
I am using Stata 12 blogit with an interaction term that has a positive coefficient (0.0047215), yet the average marginal effect is negative (-551.4792). I am not sure why this paradox occurs, so would appreciate any insights.
Note, the blogit command uses folded data, data that includes the number of 1's (the first variable) out of the number at risk in the population (the second variable), but results are same as logit command if data were unfolded with a 0-1 dependent variable. Hence, blogit is not the issue. I calculated the average marginal effect in excel, so it is working properly too.
A reason for the paradox may be that the population of the intervention county has a million people, while the rest of the state has 25 million. The margins command predicts a count of the number of 1's, but still, the signs of the blogit coefficent and the average marginal effect coefficient should be the same.
I realize that in a logistic regression model, the interaction effect of two interventions (in other words, the cross-derivative) does not equal the marginal effect of the interaction term (Ai & Norton, 2003). However, the difference-in-differences (DiD) interaction term included only a single intervention variable (that is, county 2 [c2]); therefore, the interaction effect equals the marginal effect of the DiD interaction term, because the interaction effect was identified from the DiD of the observed outcome under intervention minus the DiD of the potential outcome under nonintervention (Puhani 2012; Karaca-Mandic et al., 2012).
Here is the output:
. blogit a1111_d21aai PopRnd i.c2##i.year11_15
c2#year11_15 coeff = 0.0047215 (this is the coeff, not the odds ratio)
. margins if e(sample)==1, at(year11_15 = (0,1) c2 = (0,1)) coeflegend post
. lincom (_b[4._at] - _b[3._at]) - (_b[2._at] - _b[1._at])
coeff = -551.4792
Thanks,
Brent Fulton
Ai C, Norton EC: Interaction terms in logit and probit models. Economics Letters 80:123–129, 2003
Puhani PA: The treatment effect, the cross difference, and the interaction term in nonlinear “difference-in-differences” models. Economics Letters 115:85–87, 2012
Karaca-Mandic P, Norton EC, Dowd B: Interaction terms in nonlinear models. Health Services Research 47:255–274, 2012