Announcement

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

  • Interaction between dummy variable and time dummy variable

    Dear all,
    I am writing here with the hope I can find help regarding an obstacle that I am having with Stata. I have a dataset that contains information for 3 years, and according to Wooldridge, to check if the effect of a variable has changed over a certain time period, then I have to interact the variable with the year dummy. So my base year is year=2014, and the other two years are 2016 and 2018. I want to check how being unemployed in 2018 and 2016 affects the dependent variable in comparison to 2014. If I run in Stata the code reg y var1 var2 unemployed i.year i.unemployed#i.year, the interaction term unemployed#2018 gets ommited. I have also tried to interact unemployed with dummy year for 2016 and then also interact it with dummy year for 2018, but then other interactions get ommited as well. I also have interactions of other categorical variables with year dummies and it has worked perfectly. Now I wonder whether I have correctly understood the concept from Wooldridge book or maybe my code is not correct. Does anyone have any idea how to proceed?

    Best Regards,
    Lola Brahimi

  • #2
    That's probably due to collinearity. Instead of guessing, presenting the command and output is the best approach to entice a helpful reply.
    Best regards,

    Marcos

    Comment


    • #3
      Dear Marcos,
      Thank you for your fast reply. The code is : regress party_preference male unemployed1 i.education_isced97 i.year i.education_isced97#i.year i.unemployed1#i.year, allbaselevels
      and the result table is the one below. And yes, I do get a message that unemployed1#2018.year are omitted because of collinearity but I believe that this would be fixed if the year 2014 would remain still the base year in the interaction term between unemployed and year. Using the ib1 does not make any changes at all. Am I missing something here?
      Click image for larger version

Name:	regression.png
Views:	1
Size:	36.0 KB
ID:	1503911


      Best Regards,
      Lola Brahimi

      Comment


      • #4
        If you want to change the reference level, say, to 3, you may type "ib3.year" for that matter, but I don't think it will provide what you wish. Additionally, you have several interactions and the vast majority of them don't provide significant p-values. I bet this model will not provide signs of improvement, compared to the model without the interactions.
        Best regards,

        Marcos

        Comment


        • #5
          Dear Marcos,
          Thank you a lot for your suggestion. I will certainly take into consideration your advice.

          Best Regards,
          Lola

          Comment


          • #6
            Lola:

            If you include unemployed by itself, as you have, then there are only two interactions to include with the year dummies. Because you have included all three, Stata has arbitrarily dropped one for you. Currently, the coefficient on unemployed is the effect for 2018, and the coefficients on the interactions with 2014 and 2016 are the differences in the effect from 2018. So the effect for 2018 is positive and statistically significant. So would be the effect for 2016. For 2014 it is hard to tell.

            You could just define the two interactions -- unemployed with a dummy for 2016 and then for a 2018 dummy -- and include these directly. This should give what you want. I'm sure there's a better way to do it, but what I suggest will work. So include

            unemployed, unemployed_y2016, unemployed_y2018

            where you define the latter interactions.

            JW

            Comment

            Working...
            X