bcallaway11 / did

Difference in Differences with Multiple Periods, website: https://bcallaway11.github.io/did
287 stars 91 forks source link

Singular matrix and coefficient #163

Closed liqizheng0328 closed 1 year ago

liqizheng0328 commented 1 year ago

Dear Sir or Madam,

There are two questions I could not find the way to solve it. I would appreciate some feedback on these problems. (1) As is shown in the code and error below, how could I check this problem and solve it. (I have dropped the NA and repeated observation, and it works in stata by reghdfe) `> out1 <- att_gt(yname="Y",

(2) How can I output the coefficient of the control variable in this package, as it seems not to provide the argument.

Thank you very much!

bcallaway11 commented 1 year ago

The error message is saying that the design matrix isn't invertible at least for some combinations of groups and time periods. Will the code run if you use fewer covariates?

liqizheng0328 commented 1 year ago

Thanks for your reply Yes, it works when using fewer covariates.

The error message is saying that the design matrix isn't invertible at least for some combinations of groups and time periods. Will the code run if you use fewer covariates?