Announcement

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

  • Interaction Term with dummy and continuous variable!

    Hello all,

    I have a silly question regarding interaction term. Would appreciate prompt input :-)

    The research model uses Women ratio (and women dummy) as the main independent variable and leverage as the outcome variable.

    I want to see the partical effect of e.g. industry size (large, Medium) and have created the following interaction term

    gen size_interaction=WOMENDUMMY*DAX ( DAX is aslo a dummy variable & equal ==1 for large and otherwise)

    and here is the model: reg LEVERAGE WOMENDUMMY DAX size_interaction GROWTH i.year i.SIC

    I am confused whether i can use the womenratio instead of women dummy in the above model of regression considering the interaction term was generated using dummy. If not how can i generate an interaction term for continuous var (WOMEN ratio) and other dummy variable for interaction ? similarly, can i use women dummy and the continuous variable to generate an interaction term?

    I hope I haven't posted a confused query.


    Thanks.


  • #2
    You didn't get a quick answer. You'll increase your chances of a quick answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data (which you do). We don't respond to exclamation points or pushing.

    First, use factor variable notation instead of generating interactions yourself. Factor variable notation makes margins work more easily.

    reg L i.wd i.dax i.wd#i.dax growth i.year i.sic

    If you want to include the women ratio, include it along with the other variables
    reg L i.wd i.dax i.wd#i.dax wratio growth i.year i.sic

    If you want the interaction between wratio instead of the dummy

    reg L i.wd i.dax c..wratio#i.dax growth i.year i.sic

    Comment


    • #3
      Thank you Phil. I'll keep in mind next time.

      Comment

      Working...
      X