Announcement

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

  • difference in difference collinearity issue

    Dear everyone,

    I am really confused why this happened, and have spent so much time trying to solve this. Allow me to explain real quick.

    This is a typical DID set up. I have a treatment start year variable and a treatment status variable. I coded the pre-treatment year equivalents to the actual treated units a value of 1, the pre-treatment year controls 0; post treatment actual treated units 1, and post treatment controls 0. And of course an interaction between treat status and treatment start year. All four groups have valid values on all involved covariates and outcomes. And the variables don't seem to be highly correlated at all. Stata shows collinearity issue. Among the year, treat and interaction variables, only one coefficient is provided next to the year variable. If I take out the year variable, the exact coefficient (se, p value, etc.) will be next to the interaction variable (in Stata output). I provided the two outputs below. treatyear is the year var, mhigh_sn is the treat status, and mdid_sn is the interaction.

    Could anyone please share some thoughts on where I may dig further to solve this? A million thanks!!
    Difei
    Robust
    ftermgpa Coef. Std. Err. t P>t [95% Conf. Interval]
    treatyear .2120248 .0620845 3.42 0.001 .090296 .3337536
    mhigh_sn 0 (omitted)
    mdid_sn 0 (omitted)
    c_actmath .009406 .010921 0.86 0.389 -.0120067 .0308188
    Robust
    ftermgpa Coef. Std. Err. t P>t [95% Conf. Interval]
    mhigh_sn 0 (omitted)
    mdid_sn .2120248 .0620845 3.42 0.001 .090296 .3337536
    c_actmath .009406 .010921 0.86 0.389 -.0120067 .0308188

  • #2
    I can't follow your explanation at all. Your explanation makes no actual mention of the variables shown in the outputs, so there is no way to know what variables correspond to what in your discussion. In addition, you do not show the commands that gave rise to these results, so you are, in effect, asking for help troubleshooting imaginary or secret code.

    For a timely and helpful response, I recommend you repost your question and include the following:

    1. An example of your data, created using your -dataex- command. The example should include both treatment and control observations in both the pre- and post- treatment periods. If you are running version 15.1 or a fully updated version 14.2, it is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

    2. The exact code that you ran, not edited at all. This should be posted between code delimiters for maximum readability. (If you are not yet familiar with code delimiters, please read Forum FAQ #12 for an explanation.)

    3. Show again the exact results Stata gave you from these commands, but this time post it between code delimiters, rather than as an HTML table: the results will be easier to read and work with.

    4. An explanation of each of the variable in your model and how it was created.



    Comment


    • #3
      Hi, Dr. Schechter,
      I really appreciate your timely response, especially on a Saturday evening. Thank you so much!
      I wasn't sure if I could share the data since it's on restricted use. Your comments did help me move forward with my troubleshooting. Long story short, the issue lies in how I defined my DiD comparison groups and how I dealt with missing values. Now the models are running fine, but I do still want to re-evaluate my decisions a bit more.
      Next time, I will be sure to arrange Stata output in a format as required. Also thank you for the dataex command.
      All the best,
      Difei

      Comment

      Working...
      X