Hello!
I'm doing a psm with nearest neighbour matching, match each treatment firm with 3 control firms. My post variable equals 1 if it is the event year or 1 year, 2 years after the event year (so post covers 3 years). The event is staggered, it happens at different years for different treatment firms. From my understanding, only the treatment firms should have a post period, control firms never experience the event, so they shouldn't have post periods. My supervisor asked me to assign each control firm a post period for the matched treatment firm, which is a "pseudo" post period. I wonder how can I achieve this?
Some example data
Note that the _treated variable generated by psmatch2, is based on the event variable, rather than the treat variable. Specifically, the code is
where event equals 1 only once in the sample period for treatment firms, it is the year the event happens; whereas treat equals 1 for all the years in the sample period if the firm has ever experienced the event, not only for the event year. So my second question is, which variable should be used in psmatch2?
Thanks a lot for any suggestion!
I'm doing a psm with nearest neighbour matching, match each treatment firm with 3 control firms. My post variable equals 1 if it is the event year or 1 year, 2 years after the event year (so post covers 3 years). The event is staggered, it happens at different years for different treatment firms. From my understanding, only the treatment firms should have a post period, control firms never experience the event, so they shouldn't have post periods. My supervisor asked me to assign each control firm a post period for the matched treatment firm, which is a "pseudo" post period. I wonder how can I achieve this?
Some example data
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float year double firm float(event treat control post) byte _treated int(_id _n1 _n2 _n3) float _nn 2010 26 1 1 0 1 1 18820 18488 18487 18486 3 2010 28 1 1 0 1 1 18856 18550 18551 18549 3 2011 28 0 1 0 1 0 18339 18777 18776 18778 3 2012 28 0 1 0 1 0 18537 18841 18840 18839 3 2013 28 0 1 0 0 0 18461 18806 18805 18807 3 2014 28 0 1 0 0 0 18498 18824 18825 18826 3 2018 28 0 1 0 0 0 17186 18696 18695 18697 3 2018 36 0 0 1 0 0 17937 18728 18727 18729 3 2012 42 0 0 1 0 0 13482 18615 18616 18614 3 2017 48 0 0 1 0 0 13050 18611 18610 18612 3 2013 49 0 0 1 0 0 11752 18603 18604 18605 3 2016 49 0 0 1 0 0 11292 18599 18600 18601 3 2018 55 1 1 0 1 1 18638 14919 14920 14921 3 2011 65 0 1 0 0 0 16744 18680 18681 18679 3 2016 68 0 0 1 0 0 10161 18591 18592 18593 3 2017 68 0 0 1 0 0 6442 18577 18576 18575 3 2010 88 0 1 0 0 0 18545 18851 18850 18852 3 2014 90 0 1 0 0 0 18529 18833 18832 18834 3 2015 90 1 1 0 1 1 18797 18432 18433 18434 3 2017 96 0 0 1 0 0 10830 18595 18596 18597 3 2010 99 0 0 1 0 0 17979 18732 18731 18730 3 2012 156 0 1 0 0 0 18552 18858 18859 18860 3 2013 156 1 1 0 1 1 18859 18555 18556 18554 3 2016 156 0 1 0 0 0 17206 18697 18698 18696 3 2010 407 1 1 0 1 1 18808 18469 18470 18468 3 2018 410 0 0 1 0 0 6221 18576 18575 18577 3 2016 418 0 0 1 0 0 15523 18656 18657 18655 3 2013 498 1 1 0 1 1 18600 11302 11303 11301 3 2014 498 0 1 0 1 0 18513 18830 18829 18828 3 2016 507 0 0 1 0 0 10414 18593 18594 18592 3 2010 510 0 0 1 0 0 9795 18590 18589 18591 3 2018 513 0 0 1 0 0 18015 18733 18734 18735 3 2013 517 1 1 0 1 1 18605 11902 11901 11903 3 2017 519 0 0 1 0 0 14921 18638 18639 18640 3 2013 524 0 0 1 0 0 4176 18572 18571 18570 3 2012 530 0 1 0 0 0 18332 18776 18777 18775 3 2013 530 1 1 0 1 1 18593 10413 10412 10414 3 2017 531 0 0 1 0 0 16023 18664 18665 18663 3 2010 536 1 1 0 1 1 18868 18562 18561 18563 3 2011 536 0 1 0 1 0 18428 18796 18795 18794 3 2013 536 0 1 0 0 0 18534 18837 18838 18836 3 2014 536 0 1 0 0 0 18429 18796 18797 18795 3 2018 537 0 0 1 0 0 18152 18751 18750 18749 3 2018 543 0 0 1 0 0 17583 18713 18714 18715 3 2018 544 1 1 0 1 1 18704 17366 17367 17368 3 2010 547 1 1 0 1 1 18750 18150 18151 18149 3 2018 555 0 0 1 0 0 16407 18674 18675 18676 3 2010 582 0 0 1 0 0 15019 18641 18640 18639 3 2013 584 0 0 1 0 0 9009 18586 18585 18587 3 2017 586 0 0 1 0 0 8043 18580 18581 18582 3 2014 587 0 0 1 0 0 9007 18586 18585 18587 3 2012 589 0 0 1 0 0 8502 18583 18582 18581 3 2010 592 1 1 0 1 1 18770 18300 18301 18299 3 2010 600 0 0 1 0 0 17020 18688 18687 18686 3 2016 606 0 0 1 0 0 11353 18601 18600 18602 3 2014 607 1 1 0 1 1 18814 18479 18478 18477 3 2015 607 0 1 0 1 0 18519 18831 18830 18832 3 2012 608 0 0 1 0 0 10879 18596 18595 18597 3 2012 616 0 1 0 0 0 11291 18599 18600 18601 3 2016 616 1 1 0 1 1 18591 10161 10160 10159 3 2010 627 1 1 0 1 1 18771 18301 18302 18303 3 2013 627 0 1 0 0 0 18400 18789 18788 18787 3 2014 627 0 1 0 0 0 18467 18807 18808 18809 3 2015 627 0 1 0 0 0 18274 18764 18765 18766 3 2010 635 1 1 0 1 1 18823 18495 18496 18497 3 2016 635 0 1 0 0 0 8501 18583 18582 18581 3 2017 650 0 0 1 0 0 17063 18689 18690 18691 3 2012 656 0 0 1 0 0 14459 18632 18633 18634 3 2017 657 0 0 1 0 0 14161 18625 18624 18623 3 2017 661 0 0 1 0 0 17518 18712 18711 18710 3 2010 663 1 1 0 1 1 18690 17071 17072 17073 3 2010 666 0 0 1 0 0 18141 18749 18750 18751 3 2014 666 0 0 1 0 0 18562 18868 18867 18866 3 2010 671 1 1 0 1 1 18819 18486 18487 18488 3 2011 671 0 1 0 1 0 18399 18788 18789 18787 3 2014 671 0 1 0 0 0 18298 18769 18770 18771 3 2015 671 0 1 0 0 0 18416 18792 18791 18793 3 2014 672 1 1 0 1 1 18741 18052 18053 18051 3 2018 681 0 0 1 0 0 18119 18748 18747 18746 3 2010 687 0 0 1 0 0 11293 18599 18600 18601 3 2018 695 0 0 1 0 0 11402 18602 18601 18600 3 2011 697 0 0 1 0 0 3394 18569 18570 18571 3 2017 697 0 0 1 0 0 12759 18608 18609 18607 3 2014 701 1 1 0 1 1 18787 18395 18396 18397 3 2017 711 0 0 1 0 0 14756 18637 18636 18635 3 2014 720 0 0 1 0 0 6440 18577 18576 18575 3 2010 726 1 1 0 1 1 18844 18538 18539 18540 3 2011 726 0 1 0 1 0 18542 18847 18848 18846 3 2012 726 0 1 0 1 0 18517 18831 18830 18832 3 2014 726 0 1 0 0 0 18546 18851 18850 18852 3 2013 735 0 1 0 0 0 18559 18864 18863 18865 3 2014 735 1 1 0 1 1 18574 5764 5765 5763 3 2018 736 0 0 1 0 0 17016 18687 18688 18686 3 2010 753 1 1 0 1 1 18781 18375 18376 18374 3 2018 756 1 1 0 1 1 18633 14472 14471 14473 3 2013 767 0 0 1 0 0 14162 18625 18624 18623 3 2018 785 0 0 1 0 0 15214 18643 18644 18645 3 2015 796 0 1 0 0 0 18273 18764 18765 18763 3 2016 796 1 1 0 1 1 18603 11750 11751 11752 3 2010 797 1 1 0 1 1 18769 18299 18298 18300 3 end format %ty year label values _treated _treated label def _treated 0 "Untreated", modify label def _treated 1 "Treated", modify
Code:
psmatch2 event $XX i.industry i.year, out(y) neighbor(3) caliper(0.05) common ties ate
Thanks a lot for any suggestion!
