Announcement

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

  • Setting base level for regression's interaction with continuous variable

    Hello Stata experts!
    Thanks in advance for reading my post, hope the lockdown is somewhat bearable

    ---

    tl;dr

    My regression line looks like this: reg income treatment i.year i.year#c.weighted_treatment
    (weighted_treatment = specific_weight*treatment) . I want 2005 to be the base year in the interaction part (year {1999-2016}; I don't care about the year variable alone).

    -----
    I've tried to set the base in multiple ways, such as:

    i2005.year#c.weighted_treatment
    i(#7).year#c.weighted_treatment
    ib2005.year#c.weighted_treatment
    ib(2005).year#c.weighted_treatment


    I think I tried even the o2005.year and also the fvset base command.

    At this point, any other ideas would be welcomed!


    Thanks you again,
    Brit

  • #2
    The problem is that you are including an interaction involving the variabe "weighted_treatment" without having it as part of the model. Make sure that you know what you are doing because such omissions often lead to a misspecified model. You need to distribute the omission operator to all elements in the interaction to achieve what you want.

    Code:
    reg income treatment i.year i.year#c.weighted_treatment o2005.year#o.weighted_treatment

    Comment


    • #3
      Thank you so so much!!!

      The weights are identical in each year for all individuals (it's the minimum wage's percentage of increase in that year, so it is actually should be a kind of parameter and not a variable).
      The reason I'm using it is to check the impact of a 1% increase in the minimum wage, and that is (to my best knowledge) what the literature instructs in such matters.

      However, if you know of a different approach including this parameter on the i.year#treatment interaction I will be very very very happy to hear!
      Thank you again,
      Brit

      Comment


      • #4
        The weights are identical in each year for all individuals (it's the minimum wage's percentage of increase in that year, so it is actually should be a kind of parameter and not a variable)
        Ignoring the scaling, does this indicate that treatment and weighted_treatment are the same variable? If so

        Code:
        reg income ib2005.year##c.weighted_treatment

        Comment


        • #5
          Originally posted by Andrew Musau View Post
          The problem is that you are including an interaction involving the variabe "weighted_treatment" without having it as part of the model. Make sure that you know what you are doing because such omissions often lead to a misspecified model. You need to distribute the omission operator to all elements in the interaction to achieve what you want.

          Code:
          reg income treatment i.year i.year#c.weighted_treatment o2005.year#o.weighted_treatment
          This is not a satisfying response. The need to do this comes up naturally in TWFE regressions. Plus, Stata should still allow one to do that or give an error? Randomly choosing a different base category seems more like a bug than a feature...

          Comment

          Working...
          X