I'm trying to run the att_gt command from the did package on the following data:
Year __ Id __ Treat _Outcome
1996 __ 1 ___ 0 ___ 0
2000 __ 1 ___ 0 ___ 1
2004 __ 1 ___ 0 ___ 0
2008 __ 1 ___ 0 ___ 0
1996 __ 2 ___ 0 ___ 0
2000 __ 2 ___ 1 ___ 1
2004 __ 2 ___ 1 ___ 1
2008 __ 2 ___ 1 ___ 1
1996 __ 3 ___ 0 ___ 1
2000 __ 3 ___ 1 ___ 0
2004 __ 3 ___ 1 ___ 0
2008 __ 3 ___ 1 ___ 1
I have the following code:
did <- att_gt(yname = "Outcome", tname = "Year", idname = "Id", gname = "Treat", data = data)
Which yields the following error:
Error in if ((glist[g] <= tlist[(t + 1)])) { : missing value where TRUE/FALSE needed
I read this post: Error in running regression by using 'did' package, but it did not seem to help, as my data has neither NA values nor Treat == 1 when Year == 1996. I'd appreciate any help. Thank you.