synth-inference / synthdid

Synthetic difference in differences
https://synth-inference.github.io/synthdid
BSD 3-Clause "New" or "Revised" License
262 stars 98 forks source link

panel.matrices #114

Open zjwait0927 opened 9 months ago

zjwait0927 commented 9 months ago

Hi, I'm using this code with my own data,but now there exists a error: data <-read_excel("XX.xlsx") setup = panel.matrices(data)

but there exists a error Error in panel.matrices(data) : There is no variation in treatment status.

In my own data,there exists 0 or 1 in treated column,then how can i resolve this bug? Thank you!

jonbaur commented 9 months ago

I had the same issue and then found out that my data frame was actually a tibble. Use the command str() to find out if that's an issue for you as well. I just converted it to a data frame with as.data.frame().