Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • No output for margins dydyx

    Hi,

    I am trying to estimate the marginal effects for the interaction term of 1) a categorical variable that records the frequency of using a mobile phone with 5 levels (0-4) and 2) a continuous variable that is the proportion of respondents in a primary sampling unit that voted.

    My model is coded as: melogit yvar i.phoneusefreq##c.votedproportion other controls
    margins, dydx(*) atmeans post

    When I hand code an interaction term, I am able to obtain the marginal effects, but I know this is not the correct approach and one should follow Stata's ## notation for interactions, but my output has no estimates for the marginal effects when I use this approach. Is there a way to overcome this?

    Thanks.

  • #2
    There is no such thing as the marginal effect of an interaction term. That is why Stata refuses to calculate one. Yes, you can trick Stata into this meaningless calculation by using a hand-coded interaction term. Since Stata won't know it's an interaction term it will proceed to calculate the useless statistic.

    There are several explanations why interaction terms do not have a marginal effect. I think the simplest of them is this. Consider an interaction term x1#x2. If it had a marginal effect, it would be the expected difference in out come associated with a unit change in x1#x2. But a unit change in x1#x2 can arise in different ways: it could result from (x1,x2) changing to (1,1) from (0,1), from (1,0) or from (0,0). But the expected change in outcome is not the same for these three circumstances. So the "marginal effect" is not definable for an interaction.

    Comment

    Working...
    X