When I try to use eventdd to construct the simplest event study plot, I don't know why the date dummy become omitted and return a blank graph
Here is the code and data I used
And the result pops the omitted for every leads and lags:
Here is the code and data I used
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str20 state byte fips float date double p_bar float(tdate diff) "Alabama" 1 708 814 733 -25 "Alabama" 1 709 856 733 -24 "Alabama" 1 710 883 733 -23 "Alabama" 1 711 824 733 -22 "Alabama" 1 712 792 733 -21 "Alabama" 1 713 685 733 -20 "Alabama" 1 714 604 733 -19 "Alabama" 1 715 322 733 -18 "Alabama" 1 716 35 733 -17 "Alabama" 1 717 30 733 -16 "Alabama" 1 718 38 733 -15 "Alabama" 1 719 38 733 -14 "Alabama" 1 720 983 733 -13 "Alabama" 1 721 885 733 -12 "Alabama" 1 722 616 733 -11 "Alabama" 1 723 387 733 -10 "Alabama" 1 724 711 733 -9 "Alabama" 1 725 290 733 -8 "Alabama" 1 726 232 733 -7 "Alabama" 1 727 204 733 -6 "Alabama" 1 728 57 733 -5 "Alabama" 1 729 46 733 -4 "Alabama" 1 730 38 733 -3 "Alabama" 1 731 29 733 -2 "Alabama" 1 732 810 733 -1 "Alabama" 1 733 1066 733 0 "Alabama" 1 734 1306 733 1 "Alabama" 1 735 1338 733 2 "Alabama" 1 736 1271 733 3 "Alabama" 1 737 1169 733 4 "Alabama" 1 738 1277 733 5 "Alabama" 1 739 1047 733 6 "Alabama" 1 740 1126 733 7 "Alabama" 1 741 1295 733 8 "Alabama" 1 742 1237 733 9 "Alabama" 1 743 1186 733 10 "Alabama" 1 744 1751 733 11 "Alabama" 1 745 1711 733 12 "Alabama" 1 746 2265 733 13 "Alabama" 1 747 2112 733 14 "Alabama" 1 748 2165 733 15 "Alabama" 1 749 1979 733 16 "Alabama" 1 750 1896 733 17 "Alabama" 1 751 2054 733 18 "Alabama" 1 752 2023 733 19 "Alabama" 1 753 1946 733 20 "Alabama" 1 754 1818 733 21 "Alabama" 1 755 1832 733 22 "Alaska" 2 708 71 733 -25 "Alaska" 2 709 60 733 -24 "Alaska" 2 710 82 733 -23 "Alaska" 2 711 99 733 -22 "Alaska" 2 712 88 733 -21 "Alaska" 2 713 55 733 -20 "Alaska" 2 714 90 733 -19 "Alaska" 2 715 87 733 -18 "Alaska" 2 716 92 733 -17 "Alaska" 2 717 75 733 -16 "Alaska" 2 718 70 733 -15 "Alaska" 2 719 66 733 -14 "Alaska" 2 720 64 733 -13 "Alaska" 2 721 62 733 -12 "Alaska" 2 722 59 733 -11 "Alaska" 2 723 41 733 -10 "Alaska" 2 724 64 733 -9 "Alaska" 2 725 47 733 -8 "Alaska" 2 726 67 733 -7 "Alaska" 2 727 64 733 -6 "Alaska" 2 728 67 733 -5 "Alaska" 2 729 66 733 -4 "Alaska" 2 730 37 733 -3 "Alaska" 2 731 53 733 -2 "Alaska" 2 732 59 733 -1 "Alaska" 2 733 53 733 0 "Alaska" 2 734 74 733 1 "Alaska" 2 735 99 733 2 "Alaska" 2 736 67 733 3 "Alaska" 2 737 70 733 4 "Alaska" 2 738 77 733 5 "Alaska" 2 739 72 733 6 "Alaska" 2 740 52 733 7 "Alaska" 2 741 65 733 8 "Alaska" 2 742 48 733 9 "Alaska" 2 743 63 733 10 "Alaska" 2 744 51 733 11 "Alaska" 2 745 30 733 12 "Alaska" 2 746 46 733 13 "Alaska" 2 747 53 733 14 "Alaska" 2 748 50 733 15 "Alaska" 2 749 46 733 16 "Alaska" 2 750 50 733 17 "Alaska" 2 751 47 733 18 "Alaska" 2 752 55 733 19 "Alaska" 2 753 30 733 20 "Alaska" 2 754 46 733 21 "Alaska" 2 755 39 733 22 "Arizona" 4 708 2389 733 -25 "Arizona" 4 709 2306 733 -24 "Arizona" 4 710 2575 733 -23 "Arizona" 4 711 2484 733 -22 end format %tmCCYY/NN date format %tm tdate label values fips fips label def fips 1 "Alabama", modify label def fips 2 "Alaska", modify label def fips 4 "Arizona", modify
Code:
gen tdate = ym(2021,2) gen diff = date - tdate format tdate %tm xtset fips date eventdd p_bar i.date, timevar(diff) method(fe, cluster(fips))
Code:
. eventdd p_bar i.date, timevar(diff) method(fe, cluster(fips)) note: lead25 omitted because of collinearity note: lead24 omitted because of collinearity note: lead23 omitted because of collinearity note: lead22 omitted because of collinearity note: lead21 omitted because of collinearity note: lead20 omitted because of collinearity note: lead19 omitted because of collinearity note: lead18 omitted because of collinearity note: lead17 omitted because of collinearity note: lead16 omitted because of collinearity note: lead15 omitted because of collinearity note: lead14 omitted because of collinearity note: lead13 omitted because of collinearity note: lead12 omitted because of collinearity note: lead11 omitted because of collinearity note: lead10 omitted because of collinearity note: lead9 omitted because of collinearity note: lead8 omitted because of collinearity note: lead7 omitted because of collinearity ...
Comment