Announcement

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

  • Stata omitting interaction term due to collinearity

    Hi everyone, I'm having a bit of trouble with a difference-in-difference regression I am trying to run! I have a dummy variable 'time' which is equal to 0 if it's pre-treatment period and 1 if it's post-treatment period. I have another dummy variable 'treated' which is 0 if it's the control group and 1 if it's the treated group. I also created a 'did' interaction term variable which is time*treated. However, when I perform the regression y time treated did, it always omits 'did' due to collinearity. could anyone help out with why this is happening and how to fix this??

    Thank you!

  • #2
    show the result of:
    Code:
    ta time treated, mi

    Comment


    • #3
      Originally posted by Rich Goldstein View Post
      show the result of:
      Code:
      ta time treated, mi
      here it is:

      Click image for larger version

Name:	1.jpg
Views:	1
Size:	22.0 KB
ID:	1644085

      Last edited by Nikita Shukla; 07 Jan 2022, 14:49.

      Comment


      • #4
        the zero in the upper right cell is the issue - there is not an "interaction" in the sense you are attempting to model

        Comment


        • #5
          Originally posted by Rich Goldstein View Post
          the zero in the upper right cell is the issue - there is not an "interaction" in the sense you are attempting to model
          thanks for your answer! sorry for not understanding but what exactly is the issue? and how should I fix it?

          Comment


          • #6
            treated should be 1 for the treated group both when time is 0 and 1

            Comment


            • #7
              Originally posted by Øyvind Snilsberg View Post
              treated should be 1 for the treated group both when time is 0 and 1
              oh of course! thank you so much!

              Comment

              Working...
              X