Hello,
I'm having difficulty running a difference-in-difference (DiD) test in stata and was hoping someone could offer some advice.
Below is subset of my data.
My data includes:
Volume = the number of equities traded in a particular minute
Pre_or_Post_Colo = a flag with a zero if the trades occurred before a certain date (pre) and a 1 if they occurred after a certain date (post)
Flag_day_before_ann_1 = a flag of 1 represents trading on a day prior to an announcement for that stock, and a zero represents the day an announcement was made
PriceSensitive3 = a flag of zero if for that trade it there was no announcement, 1 if there was a price sensitive market announcement and and flag of 2 if there was a non price sensitive announcement
I'm trying to assess a DiD for the following:
1 - Volume, pre, on the day of an announcement compared to the day prior, depending on whether there was no announcements a price sensitive announcement or a non price sensitive announcement
2 - Volume, post, on the day of an announcement compared to the day prior, depending on whether there was no announcements a price sensitive announcement or a non price sensitive announcement
- The DiD between 1 and 2
I cant seem to work out the command to do this either using the command line and or the built in function. Can a forum member offer some advice please?
Thanks
-------------------------------------
input double(Volume Pre_or_Post_Colo) byte Flag_day_before_ann_1 float PriceSensitive3
34 0 0 0
2105 0 0 0
11 0 0 0
8492 0 0 0
23 0 0 0
1217 0 0 0
4743 0 0 0
1017 0 0 0
375 0 0 0
154 0 0 0
2018 0 0 0
3449 0 0 0
10 0 0 0
40 0 0 0
1668 0 0 0
162 0 0 0
614 0 0 0
10172 0 0 0
43 0 0 0
86 0 0 0
5969 0 0 0
2499 0 0 0
116 0 0 0
5227 0 0 0
105 0 0 0
9406 0 0 0
384 0 0 0
3 0 0 0
2752 0 0 0
27 0 0 0
4931 0 0 0
9805 0 0 0
24028 0 0 0
15 0 0 0
5356 0 0 0
2000 0 0 0
196 0 0 0
27 0 0 0
785 0 0 0
1583 0 0 0
3000 0 0 0
47168 0 0 0
10768 0 0 0
407 0 0 0
12485 0 0 0
553 0 0 0
934 0 0 0
5656 0 0 0
128 0 0 0
713 0 0 0
500 0 0 0
1 0 0 0
773 0 0 0
95106 0 0 0
7440 0 0 0
36 0 0 0
54944 0 0 0
6641 0 0 0
9031 0 0 0
11702 0 0 0
40796 0 0 0
31 0 0 0
3556 0 0 0
11148 0 0 0
248 0 0 0
11649 0 0 0
3349 0 0 0
82 0 0 0
9342 0 0 0
458 0 0 0
2254 0 0 0
112000 0 0 0
10 0 0 0
3097 0 0 0
37121 0 0 0
483 0 0 0
21118 0 0 0
49 0 0 0
107 0 0 0
901398 0 0 0
1747 0 0 0
41 0 0 0
142048 0 0 0
1078 0 0 0
683 0 0 0
86 0 0 0
216 0 0 0
10154 0 0 0
1759 0 0 0
330903 0 0 0
315 0 0 0
5 0 0 0
11425 0 0 0
2236 0 0 0
5766 0 0 0
4547 0 0 0
419 0 0 0
445 0 0 0
359 0 0 0
283 0 0 0
end
I'm having difficulty running a difference-in-difference (DiD) test in stata and was hoping someone could offer some advice.
Below is subset of my data.
My data includes:
Volume = the number of equities traded in a particular minute
Pre_or_Post_Colo = a flag with a zero if the trades occurred before a certain date (pre) and a 1 if they occurred after a certain date (post)
Flag_day_before_ann_1 = a flag of 1 represents trading on a day prior to an announcement for that stock, and a zero represents the day an announcement was made
PriceSensitive3 = a flag of zero if for that trade it there was no announcement, 1 if there was a price sensitive market announcement and and flag of 2 if there was a non price sensitive announcement
I'm trying to assess a DiD for the following:
1 - Volume, pre, on the day of an announcement compared to the day prior, depending on whether there was no announcements a price sensitive announcement or a non price sensitive announcement
2 - Volume, post, on the day of an announcement compared to the day prior, depending on whether there was no announcements a price sensitive announcement or a non price sensitive announcement
- The DiD between 1 and 2
I cant seem to work out the command to do this either using the command line and or the built in function. Can a forum member offer some advice please?
Thanks
-------------------------------------
input double(Volume Pre_or_Post_Colo) byte Flag_day_before_ann_1 float PriceSensitive3
34 0 0 0
2105 0 0 0
11 0 0 0
8492 0 0 0
23 0 0 0
1217 0 0 0
4743 0 0 0
1017 0 0 0
375 0 0 0
154 0 0 0
2018 0 0 0
3449 0 0 0
10 0 0 0
40 0 0 0
1668 0 0 0
162 0 0 0
614 0 0 0
10172 0 0 0
43 0 0 0
86 0 0 0
5969 0 0 0
2499 0 0 0
116 0 0 0
5227 0 0 0
105 0 0 0
9406 0 0 0
384 0 0 0
3 0 0 0
2752 0 0 0
27 0 0 0
4931 0 0 0
9805 0 0 0
24028 0 0 0
15 0 0 0
5356 0 0 0
2000 0 0 0
196 0 0 0
27 0 0 0
785 0 0 0
1583 0 0 0
3000 0 0 0
47168 0 0 0
10768 0 0 0
407 0 0 0
12485 0 0 0
553 0 0 0
934 0 0 0
5656 0 0 0
128 0 0 0
713 0 0 0
500 0 0 0
1 0 0 0
773 0 0 0
95106 0 0 0
7440 0 0 0
36 0 0 0
54944 0 0 0
6641 0 0 0
9031 0 0 0
11702 0 0 0
40796 0 0 0
31 0 0 0
3556 0 0 0
11148 0 0 0
248 0 0 0
11649 0 0 0
3349 0 0 0
82 0 0 0
9342 0 0 0
458 0 0 0
2254 0 0 0
112000 0 0 0
10 0 0 0
3097 0 0 0
37121 0 0 0
483 0 0 0
21118 0 0 0
49 0 0 0
107 0 0 0
901398 0 0 0
1747 0 0 0
41 0 0 0
142048 0 0 0
1078 0 0 0
683 0 0 0
86 0 0 0
216 0 0 0
10154 0 0 0
1759 0 0 0
330903 0 0 0
315 0 0 0
5 0 0 0
11425 0 0 0
2236 0 0 0
5766 0 0 0
4547 0 0 0
419 0 0 0
445 0 0 0
359 0 0 0
283 0 0 0
end
Comment