Announcement

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

  • Two-way interactions with the same variable

    Dear users, I would like to know your opinion about the following issue: I have to insert some two-way interactions in my equation, in which the same variable (migrant) is interacted with different variables, one at a time.

    Is the correct way of modelling this interaction reg Y i.migrant##i.varA i.migrant##i.varB ?
    I mean, by doing so the variable migrant enters only once with its 'main' effect + all its interaction effects with the correspondent interacted variable, right?

    Thanks a lot in advance, best, G.

  • #2
    not sure I completely understand but I think that if you look at
    Code:
    help fvvarlist
    you will see a section on "Applying operators to a group of variables" towards the end and I think that will answer your question

    Comment


    • #3
      Giorgio:
      try
      Code:
      reg Y i.migrant##(i.varA i.varB)
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Dear Rich, Carlo,
        thanks a lot, I solved thanks to your suggestions.

        Best, G.

        Comment

        Working...
        X