Announcement

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

  • Calculating the marginal effect of the independent variable in a logit model when it has been interacted with two other variables

    I am using a logit model to look at the effect of competitiveness on gambling, using competitive sport as a proxy to measure competitiveness. My dependent variable is a dummy variable, which takes the value 1 if someone gambled in the past 12 months and 0 otherwise. My independent variable is a categorical variable, taking the value 1 if someone took part in competitive sport, 2 if they took part in only fitness-based physical activity and 0 if they did not undertake any physical activity at all. I also have a range of control variables.

    Two of my control variables are gender and age (and age squared since the age distribution was quadratic). I was interested in seeing how the effect of competitive sport on gambling varies with gender and age, so I interacted the competitive sport variable with gender, age and age squared. I then used marginsplot to see how the marginal effect of competitive sport on gambling varies across gender and age. My initial regression did not include the age and gender interactions.

    When I'm evaluating the total, direct effect of competitive sport on gambling using margins, dydx(*) atmean, should I remove the interactions from the regression or keep them in? Given that marginal effects do not exist for interaction terms, I am unsure how to proceed.

    As an additional point, I also have data on the different types of gambling activities people engage in. I have grouped these activities into 2 broad categories: skill-based (gambling activities where people have some element of control over the outcome) and pure-chance (activities where people have no control over the outcome). I have created a dummy variable to capture this, which takes the value 1 if someone took part in any skill-based activity and 0 if they took part in only pure-chance activities. I want to see whether people who take part in competitive sport are more likely to engage in skill-based rather than pure-chance activities. Given that non-gamblers cannot take part in either skill-based or pure-chance activities, I was thinking of using a heckprobit model to account for the potential sample selection bias. I am unsure of whether the 'select' part of the heckprobit model should include the age and gender interaction terms or not?

  • #2
    If I understood your query right, margins and marginsplot excel when dealing with interaction terms.

    You just need to have the predictors (and interaction terms) included, as be sure to use the factor notation for the categorical variables.

    Here, you have some examples.

    That said, the best way to understand your model is sharing command and output, as recommend in the FAQ.
    Best regards,

    Marcos

    Comment


    • #3
      Thank you for your reply Marcos. I think perhaps my question wasn't clear. I was asking if I include an interaction terms in my model between competitive sport and gender (i.e. competitive sport * Sex) and competitive sport and age (i.e. competitive sport * age and competitive sport * age squared), how would I interpret the marginal effect of the competitive sport variable on its own i.e. if i am interacting A*B in a logit model, how do I interpret the marginal effect of just A on its own? However, Clyde Schechter has kindly helped with this question on another thread (http://www.statalist.org/forums/foru...-t-seem-viable).

      What I remain unsure about now is whether or not to include the age and gender interaction terms in the 'select' part of my heckprobit model?

      Should I be running the heckprobit regression without the interactions in the 'select' part of the equation as below:

      Code:
      heckprob skillbased i.sport i(0).Sex age c.age#c.age i(1).white i(1).HighQual i(1).smoker i(1).drinker logincome, select(gamble=i.sport i(0).Sex age c.age#c.age i(1).white i(7).Religion i(1).HighQual i(1).single i(1).smoker i(1).drinker  logincome)
      Or with the interactions:

      Code:
      heckprob skillbased i.sport i(0).Sex age c.age#c.age i(1).white i(1).HighQual i(1).smoker i(1).drinker logincome, select(gamble=i.sport i.sport##(c.age i(0).Sex) i(1).white i(7).Religion i(1).HighQual i(1).single i(1).smoker i(1).drinker logincome)
      Last edited by Tom Martin; 18 Apr 2017, 08:45.

      Comment


      • #4
        There is no "marginal effect of competitive sport on its own" - you model shows that this effect varies with gender and age. Some folks run the model without the interactions to estimate such an average effect. I don't like this since the parameter then depends on the frequency of age and gender groups in the sample.

        Comment

        Working...
        X