Announcement

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

  • What does "levels of interactions not allowed" mean?

    After running the mprobit, I got coefficient results for all variables, including the variables wih interaction terams such as i.REG#i.SEX

    However, I put the marginal effect command. I cannnot obtain the marginal effect on for interaction terms. It shows the following error. What went wrong?

    . margins, dydx (REG#SEX) predict (pr outcome (1))
    invalid dydx() option;
    levels of interactions not allowed
    r(198);

    Many thanks for your help & regards,
    Kanoknit
    Social Researcher
    Thailand


  • #2
    The value of an interaction term cannot by itself change: either the value of REG or the value of SEX (or both) must change. So you should be looking at dydx(REG) and dydx(SEX).

    Comment


    • #3
      Hi Kanoknit,

      I agree with WIlliam. If you want to change them both simultaneously, you could type:

      Code:
      margins r.SEX, dydx(REG)
      This is tantamount to a second derivative. Below is something I played with a while back thinking about this situation in a bit of a different context.

      https://blog.stata.com/2016/07/12/ef...-interpreting/

      Comment


      • #4
        Many thanks to both of you. Really appreciated

        Dear Enrique Pinzon (STATA)

        I looked into the link that you gave me about the pairwise comparison. From the example, I saw that the probit output showed that that the variables "education" and "divorce" are statistically significant at p value <0.05. Then, the command (pairwise comparison between "education" and "divorce") was run. So does it mean that the variables must be satistically significant for the selected variables (the variables that we would like to run pairwise) before we run pairwise.

        I did not see the p-value in the output table after running pairwise comparison.

        Comment


        • #5
          Dear Kanoknit,

          Sorry for the late reply.

          Variables do not need to be significant before running pairwise comparisons. Also, if you want to get the confidence intervals and also the p-values you need to type -margins..., contrast(effects)-. By default, the table is reporting confidence intervals.

          Comment

          Working...
          X