Announcement

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

  • dqd: X'X matrix in auxiliary regression not invertible

    Hello all,

    I am trying to test the alternative Parallel(q) assumption for difference-in-differences analysis using the command dqd proposed by (Mora and Reggio, 2012).
    Please see data below.

    The years 2008 till 2016 are pre-treatment periods and 2017 is the only post-treatment period. The variable Blockchain indicates whether a firm is treated(Blockchain=1) or not(Blockchain=0.
    The code that I have used is:
    dqd Profit if (Year<2017), treated(Blockchain) time(Year) standard

    But STATA shows that X'X matrix in auxiliary regression not invertible.
    1) How can this be solved please?
    2) Is there a difference between the commands didq and dqd?

    Thank you very much!

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input byte Company_id int Year long Profit byte Blockchain
    2 2017  8762000 0
    2 2016  4617000 0
    2 2015  -866000 0
    2 2014  6527000 0
    2 2013  3665000 0
    2 2012 -3028000 0
    2 2011  5826000 0
    2 2010 14324000 0
    2 2009  4872000 0
    2 2008  3676000 0
    1 2017  5890000 1
    1 2016 -6385000 1
    1 2015  1910000 1
    1 2014 13832000 1
    1 2013 11223000 1
    1 2012 15417000 1
    1 2011 23648000 1
    1 2010 12722000 1
    1 2009  5877000 1
    1 2008 15390000 1
    3 2017  5777000 0
    3 2016  1379000 0
    3 2015 -4964000 0
    3 2014  2308000 0
    3 2013 -8046000 0
    3 2012  1004000 0
    3 2011  4048000 0
    3 2010  1291000 0
    3 2009   983000 0
    3 2008   367000 0
    4 2017 47795000 0
    4 2016 24910000 0
    4 2015  2718786 0
    4 2014  6422782 0
    4 2013 45079000 0
    4 2012  7903205 0
    4 2011 45846000 0
    4 2010  5863506 0
    4 2009 31706000 0
    4 2008 26641000 0
    end

  • #2
    You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex.

    With an internal problem in a user-written routine, you're probably best going to the author. Just a guess, would adding some additional variables help?

    Comment


    • #3
      Hi Lilong. I had a similar problem to you and did not find the forum helpful. In my case the matrix was not invertible because I had collinearity issues in my model. These are not an issue when specifying the DID estimation commands, but you will have to use the "force" option to get the command to work when using didq. I hope this helps you or a future user out.

      Comment

      Working...
      X