I want to analyze the impact that the introduction of Google Fiber in Kansas City had on hours worked among Kansas Citians. My initial approach was to use a DiD analysis with St. Louis as the control group since it had the closest common trend in hours worked to Kansas City in the pre-treatment (pre-2012) period. However, my professor recommended using a synthetic control group instead of choosing a control group based on the closest common trend among existing cities.
I read into the 'synth' command and have successfully used it to obtain the weighted average of other US metropolitan areas that best represents what the control group should be, but now I can't figure out how to actually see the impact of the treatment on hours worked (other than graphically). Could I somehow use this synthetic control group as a control group in my DiD analysis? Is there a way to run the 'synth' command and generate coefficient estimates? Can anyone help me out here?
Here is an example of my dataset:
Here is how I get the synthetic control weights:
Here is my original Kansas City vs. St. Louis DiD (i.e. the regression I want to run but don't know how to with a synthetic control group):
I read into the 'synth' command and have successfully used it to obtain the weighted average of other US metropolitan areas that best represents what the control group should be, but now I can't figure out how to actually see the impact of the treatment on hours worked (other than graphically). Could I somehow use this synthetic control group as a control group in my DiD analysis? Is there a way to run the 'synth' command and generate coefficient estimates? Can anyone help me out here?
Here is an example of my dataset:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int(year metarea) float(ahrsworkt age cinethp male white black foreign_born faminc_0025 faminc_2550 faminc_5075 faminc_75100 faminc_100m hs_grad bachelors advanced_degree white_collar nyear) 2001 80 36.539803 37.974884 .55279505 .5 .8401827 .14383562 .02739726 .1820513 .3153846 .2205128 .2820513 0 .8881279 .3333333 .07990868 .3538813 18 2002 80 36.732758 38.44531 . .49609375 .84375 .1484375 .015625 .33984375 .21875 .19140625 .25 0 .921875 .3515625 .09765625 .3984375 18 2003 80 37.672672 41.40223 .56 .5223464 .8296089 .1592179 .04189944 .248538 .28070176 .19590643 .21637426 .05847953 .9553072 .3687151 .12849163 .3882681 18 2004 80 38.63687 40.90425 . .5053192 .8510638 .13829787 .031914894 .3191489 .2074468 .1968085 .27659574 0 .9361702 .4042553 .17021276 .4734043 18 2005 80 37.46524 40.08531 . .4881517 .8720379 .1184834 .03791469 .15135135 .3243243 .23783784 .15135135 .13513513 .9099526 .29383886 .08056872 .3601896 18 2006 80 38.84568 40.05495 . .489011 .8681319 .12087912 .032967035 .17880794 .25827813 .26490065 .17218544 .12582782 .9120879 .2802198 .06593407 .2802198 18 2007 80 40.15892 40.64185 . .4929078 .858156 .09574468 .07092199 .1277533 .3215859 .21585903 .1629956 .17180617 .9680851 .3333333 .14539006 .4113475 18 2008 80 38.90345 42.46584 . .5031056 .9068323 .06832298 .0310559 .11029412 .2720588 .29411766 .13235295 .19117647 .9378882 .3229814 .11801242 .3850932 18 2009 80 38.90171 41.66788 . .5291971 .959854 .03649635 .02189781 .11737089 .17840375 .399061 .13615024 .1690141 .919708 .22627737 .0729927 .3211679 18 2010 80 38.94382 42.02649 . .5529801 .9503312 .04304636 .006622517 .11589404 .2152318 .29801324 .17880794 .19205298 .9337748 .20198676 .05298013 .29801324 18 2011 80 38.31602 41.72587 1 .57528955 .9111969 .06563707 .0888031 .1003861 .3166023 .2123552 .2200772 .15057915 .9227799 .24710424 .0965251 .3166023 18 2012 80 38.79832 40.34921 .7857143 .56349206 .9365079 .05555556 .0952381 .16666667 .3174603 .22222222 .11904762 .1746032 .9206349 .3015873 .07936508 .3730159 18 2013 80 37.473682 42.68077 .8701299 .5307692 .8769231 .09615385 .05384615 .15384616 .2076923 .18846154 .20384616 .24615385 .9538462 .3269231 .1 .3 18 2014 80 37.27612 41.04082 . .53061223 .8231292 .11564626 .06122449 .1292517 .3197279 .13605443 .17687075 .23809524 .9659864 .37414965 .08163265 .4081633 18 2015 80 38.115704 41.63878 .6637931 .54372627 .8212928 .10646388 .09505703 .09505703 .26615968 .2053232 .2015209 .23193917 .9391635 .4068441 .121673 .4448669 18 2016 80 36.542637 41.21168 . .50364965 .8832117 .08759124 .06569343 .11678832 .2408759 .1970803 .1970803 .2481752 .9635037 .3284672 .13868614 .4160584 18 2017 80 37.88 42.88406 . .51449275 .8768116 .07971015 .072463766 .08695652 .13043478 .29710144 .19565217 .28985506 .9275362 .3695652 .17391305 .4202898 18 2018 80 37.03521 40.85526 . .5197368 .8881579 .07894737 .04605263 .13157895 .125 .17763157 .19736843 .36842105 .9276316 .4736842 .1644737 .4473684 18 2001 160 37.545456 40.27882 .6234568 .5093834 .919571 .06702413 .02680965 .184 .304 .236 .276 0 .8847185 .2680965 .08579089 .34316355 18 2002 160 38.62705 40.84848 . .5113636 .9090909 .06060606 .05681818 .3636364 .14393939 .24242425 .25 0 .8977273 .3219697 .15530303 .3977273 18 2003 160 37.98953 39.81081 .6049383 .5012285 .8845209 .06879607 .07616708 .25633803 .2056338 .24507043 .25070423 .04225352 .9017199 .3660934 .14987715 .4127764 18 2004 160 39.07692 40.18269 . .5144231 .9230769 .04326923 .03846154 .4278846 .21153846 .13461539 .22596154 0 .9134616 .3894231 .14903846 .4038461 18 2005 160 38.0991 39.92308 . .52136755 .9188034 .05128205 .06410257 .1027027 .2918919 .23243243 .1891892 .1837838 .8846154 .33760685 .11965812 .4017094 18 2006 160 37.983955 38.5 . .50510204 .8979592 .04591837 .071428575 .10650887 .28994083 .2781065 .147929 .1775148 .8826531 .3265306 .09693877 .4030612 18 2007 160 36.17699 42.44134 . .50558656 .9078212 .04748603 .0726257 .0862069 .2 .27931035 .18965517 .2448276 .9301676 .3743017 .1452514 .4329609 18 2008 160 38.87923 41.92445 . .50666666 .8355556 .09777778 .07555556 .08108108 .2 .1837838 .1945946 .3405405 .9422222 .4266667 .16444445 .48 18 2009 160 36.13408 42.83582 . .5124378 .9079602 .03482587 .05472637 .08645533 .21902017 .19884726 .221902 .27377522 .9452736 .37810946 .1517413 .4527363 18 2010 160 36.460815 43.24079 . .53824365 .9065156 .05949008 .0509915 .08215298 .1983003 .21529745 .16997167 .3342776 .9490085 .3966006 .15014164 .4164306 18 2011 160 36.576923 43.78659 1 .5152439 .9054878 .07012195 .04268293 .09756097 .22256097 .2164634 .17987806 .28353658 .9512195 .4329268 .1585366 .4695122 18 2012 160 35.71687 43.87709 .9329609 .5139665 .9106146 .05027933 .08379889 .08938547 .2011173 .26815644 .12849163 .3128492 .9497207 .3743017 .16201118 .424581 18 2013 160 38.023254 42.9848 .962963 .5106383 .8753799 .07902735 .07598785 .112462 .18541034 .1945289 .1975684 .3100304 .9513678 .3829787 .1550152 .43465045 18 2014 160 36.7006 43.88235 . .5187166 .8609626 .0909091 .09625668 .1764706 .19251336 .12299465 .19786096 .3101604 .9465241 .3636364 .1550802 .4064171 18 2015 160 38.31597 44.02237 .7434211 .5079872 .8690096 .0798722 .07667731 .12779553 .20447284 .15015975 .14057508 .3769968 .9488818 .39297125 .18210863 .4408946 18 2016 160 37.66418 42.41611 . .5033557 .8724832 .0805369 .06040268 .13422818 .1543624 .08724833 .24832214 .3758389 .8993289 .3825503 .24161074 .4832215 18 2017 160 34.742332 42.59659 . .5056818 .8181818 .13068181 .10227273 .0909091 .11363637 .13068181 .17045455 .4943182 .8977273 .4886364 .21022727 .4943182 18 2018 160 38.34108 42.11765 . .4705882 .8014706 .13235295 .10294118 .08088236 .2352941 .13970588 .11764706 .4264706 .9338235 .5147059 .2132353 .49264705 18 2001 200 38.88652 38.73595 .4969879 .5022472 .8797753 .019101124 .11011236 .229765 .3498695 .232376 .18798956 0 .8741573 .26292136 .08539326 .28876406 18 2002 200 38.5057 39.03238 . .5215827 .9064748 .03057554 .11690647 .3165468 .3039568 .20143884 .17805755 0 .868705 .2733813 .0971223 .3021583 18 2003 200 37.94147 39.66055 .52681386 .5034404 .8761468 .0206422 .12155963 .27078384 .283848 .21733966 .1935867 .034441806 .8704128 .25802752 .10665137 .3635321 18 2004 200 38.39479 41.01585 . .5105634 .8521127 .0193662 .10387324 .2975352 .2447183 .21302816 .2447183 0 .8714789 .3045775 .11267605 .38732395 18 2005 200 38.49247 40.7008 . .52409637 .8855422 .04016064 .12851405 .18574513 .3045356 .25053996 .12958963 .12958963 .8514056 .32730925 .09036145 .3955823 18 2006 200 38.37054 39.62341 . .51276594 .8978723 .029787235 .13404255 .17567568 .3198198 .18693693 .1554054 .16216215 .8723404 .3085106 .11914894 .33404255 18 2007 200 38.16509 40.91026 . .5153846 .8846154 .03076923 .11666667 .15893108 .29113925 .18706048 .15049227 .21237694 .8807693 .33846155 .13461539 .3961538 18 2008 200 38.133488 41.78448 . .5280172 .875 .030172413 .12068965 .13705584 .23350254 .2436548 .1218274 .26395938 .8965517 .3189655 .13577586 .3663793 18 2009 200 37.45926 41.54594 . .5312916 .8761651 .034620505 .16245006 .18793103 .27068967 .1724138 .1224138 .2465517 .8801598 .3448735 .1584554 .3981358 18 2010 200 37.256134 41.42742 . .52150536 .8440861 .034946237 .14247312 .21774194 .25134408 .2016129 .12365592 .20564516 .891129 .3346774 .14112903 .4126344 18 2011 200 37.688602 42.19857 .9942857 .5214286 .8385714 .024285715 .14428571 .17714286 .25714287 .19285715 .12714286 .2457143 .8628572 .3457143 .1642857 .41285715 18 2012 200 37.902042 41.63433 .8656716 .51492536 .8507463 .007462686 .12313433 .1641791 .23880596 .22761194 .14925373 .22014925 .9179105 .3768657 .1567164 .4664179 18 2013 200 36.2568 42.53371 .7552083 .52080345 .866571 .028694404 .1276901 .18651363 .2180775 .21520804 .1492109 .23098996 .8981349 .3601148 .1635581 .41606885 18 2014 200 37.057693 41.10638 . .52978724 .8425532 .031914894 .14042553 .22978723 .21276596 .20212767 .10638298 .24893618 .8829787 .293617 .12765957 .3574468 18 2015 200 37.992714 41.75232 .7393939 .51474303 .882898 .02021904 .1533277 .1979781 .2485257 .2064027 .12973884 .21735467 .884583 .3007582 .12805392 .35299075 18 2016 200 37.729218 41.77396 . .504142 .8721893 .033136096 .1147929 .1514793 .24970414 .2153846 .13727811 .24615385 .9065089 .312426 .13136095 .3857988 18 2017 200 37.570652 41.82244 . .5080148 .8816276 .03329223 .15289766 .16399507 .2318126 .22071517 .13070284 .25277436 .9087546 .3563502 .15536375 .4093711 18 2018 200 37.821007 41.78984 . .5077574 .8801128 .03102962 .15232722 .14668547 .26375178 .2002821 .11565585 .27362484 .9040903 .3385049 .1438646 .4005642 18 2001 240 38.89368 39.80263 .5864662 .5 .9631579 .02631579 .09473684 .15479876 .3065015 .2260062 .3126935 0 .9210526 .24736843 .09736842 .3131579 18 2002 240 39.55072 39.94248 . .53097343 .960177 .02654867 .1061947 .25663716 .23451327 .1504425 .3584071 0 .8938053 .29646018 .13274336 .3893805 18 2003 240 39.00834 39.72959 .6549708 .54846936 .9438776 .017857144 .15561225 .12466124 .26287264 .2276423 .30623305 .07859079 .8903061 .3112245 .11479592 .3673469 18 2004 240 39.98421 39.56872 . .5450237 .9241706 .04739337 .17535545 .26540285 .2464455 .26540285 .2227488 0 .8720379 .29383886 .06635071 .2748815 18 2005 240 39.6134 41.40271 . .53846157 .959276 .02714932 .11312217 .1690141 .3004695 .20657277 .07042254 .2535211 .8914027 .3484163 .13122173 .3529412 18 2006 240 38.068626 41.05804 . .51339287 .96875 .017857144 .08035714 .10243902 .22439024 .25365853 .13658537 .28292683 .9017857 .27232143 .12053572 .3169643 18 2007 240 37.789604 40.72562 . .5260771 .9319728 .04081633 .08390023 .11508951 .23273657 .25575447 .20204604 .1943734 .8843538 .27210885 .09750567 .28798187 18 2008 240 38.82326 39.78775 . .5102041 .9102041 .06122449 .11836734 .1146789 .19266056 .26605505 .1743119 .2522936 .9061224 .3265306 .11020408 .3714286 18 2009 240 36.49868 41.03704 . .4976852 .8981481 .08333334 .11574074 .14402173 .24184783 .27173913 .11684783 .2255435 .9027778 .23148148 .08333334 .3472222 18 2010 240 36.96931 41.36136 . .5022727 .9159091 .06136364 .09318182 .14318182 .2090909 .22045454 .1931818 .2340909 .9068182 .29090908 .11363637 .4 18 2011 240 37.846577 41.60235 .968504 .5435294 .88 .07294118 .14352942 .14117648 .1882353 .1952941 .20235294 .27294117 .9035294 .3058824 .09647059 .3764706 18 2012 240 38.73714 43.09948 .8848168 .57591623 .9162304 .06282722 .08900524 .06282722 .2041885 .18324608 .2041885 .3455497 .9162304 .2722513 .08376963 .3141361 18 2013 240 37.412106 42.46604 .8724832 .51990634 .9180328 .04918033 .12412178 .11241218 .23653395 .2880562 .10070258 .26229507 .9227166 .3067916 .10070258 .3185012 18 2014 240 37.640778 44.54667 . .50222224 .8977778 .05333333 .1511111 .10666667 .2088889 .2311111 .14666666 .3066667 .9066667 .3111111 .10222222 .32 18 2015 240 38.97408 43.33775 .704 .53642386 .9470199 .02317881 .12251656 .08609272 .1986755 .21192053 .22516556 .2781457 .9403973 .3145695 .0794702 .3112583 18 2016 240 38.68421 43.60563 . .52816904 .9295775 .04929578 .0915493 .09859155 .1690141 .21830986 .26760563 .24647887 .9507042 .3380282 .0915493 .3802817 18 2017 240 35.626087 43.15873 . .4920635 .9365079 .015873017 .11904762 .071428575 .15079366 .25396827 .23015873 .2936508 .952381 .3730159 .12698413 .3968254 18 2018 240 39.83065 41.75182 . .5328467 .9270073 .02919708 .1240876 .09489051 .15328467 .3576642 .20437956 .18978103 .9270073 .3138686 .09489051 .3722628 18 2001 440 37.286102 39.54684 .7239264 .5518987 .878481 .05316456 .078481 .1091954 .204023 .2729885 .4137931 0 .9164557 .42531645 .1949367 .3974684 18 2002 440 36.37267 40.31285 . .5027933 .877095 .05027933 .0726257 .2849162 .12290503 .2290503 .3631285 0 .877095 .4413408 .2122905 .4301676 18 2003 440 36.86478 39.5867 .7173913 .5202312 .867052 .05202312 .06936416 .23100305 .1793313 .2036474 .27051672 .11550152 .9132948 .3959537 .16473988 .4566474 18 2004 440 37.47938 38.92694 . .4840183 .8538813 .06392694 .11415525 .28767124 .12328767 .24657534 .3424658 0 .9041096 .4063927 .16894977 .4520548 18 2005 440 36.937107 38.00565 . .4915254 .8531073 .04519774 .13559322 .13071896 .26797387 .19607843 .11111111 .29411766 .8983051 .4180791 .18079096 .43502825 18 2006 440 38.33846 39.93151 . .5479452 .739726 .12328767 .16438356 .07575758 .13636364 .2121212 .07575758 .5 .9452055 .56164384 .3287671 .479452 18 2007 440 36.194443 41.25834 . .5 .7083333 .14166667 .15833333 .11428571 .2 .2095238 .1904762 .2857143 .95 .5416667 .25 .4916667 18 2008 440 36.383335 40.6875 . .515625 .703125 .203125 .140625 .11111111 .1851852 .12962963 .2777778 .2962963 .921875 .625 .234375 .53125 18 2009 440 34.391754 40.49557 . .5840708 .7522124 .1061947 .14159292 .1559633 .14678898 .14678898 .21100917 .33944955 .9734513 .6017699 .2920354 .6460177 18 2010 440 35.180954 41.84071 . .4955752 .8230088 .0619469 .1504425 .19469027 .1504425 .17699115 .17699115 .300885 .9646018 .6460177 .28318584 .6460177 18 2011 440 40.82178 42.71682 1 .4424779 .8141593 .07964602 .08849557 .09734514 .1858407 .2123894 .1061947 .3982301 .9734513 .619469 .3362832 .5840708 18 2012 440 33.648647 40.47368 .9736842 .55263156 .9210526 .02631579 .10526316 .2368421 .2368421 .2631579 .02631579 .2368421 .9736842 .28947368 .2368421 .4473684 18 2013 440 37.764706 40.56364 1 .4909091 .9181818 .02727273 .07272727 .07272727 .12727273 .15454546 .25454545 .3909091 .9909091 .56363636 .26363635 .54545456 18 2014 440 40.4 41.93103 . .51724136 .9310345 .05172414 .0862069 .03448276 .1724138 .2413793 .1724138 .3793103 .9310345 .6034483 .25862068 .5 18 2015 440 39.27184 40.61607 .8085107 .54464287 .8482143 .08035714 .13392857 .05357143 .23214285 .20535715 .10714286 .4017857 .9196429 .6071429 .3125 .6428571 18 2016 440 38.057972 41.79221 . .5064935 .7402598 .15584415 .22077923 .14285715 .15584415 .0909091 .23376623 .3766234 .9610389 .6363636 .3116883 .6363636 18 2017 440 38.63014 44.60811 . .527027 .7702703 .0945946 .24324325 .08108108 .0945946 .2162162 .08108108 .527027 .9864865 .7567568 .4054054 .7432432 18 2018 440 41.11111 43.51948 . .4935065 .7532467 .12987013 .25974026 .03896104 .11688311 .1948052 .14285715 .5064935 .9480519 .6233766 .3636364 .7402598 18 2001 480 40.08823 42.36752 .5576923 .4871795 .8632479 .11111111 .05982906 .2477876 .22123894 .23893805 .2920354 0 .8803419 .2820513 .08547009 .3931624 18 2002 480 37.4 40.01923 . .4615385 .8846154 .11538462 .03846154 .3269231 .17307693 .17307693 .3269231 0 .9230769 .23076923 .05769231 .3269231 18 2003 480 39.44555 37.19643 .6097561 .51785713 .9464286 .026785715 .04464286 .23214285 .25 .2142857 .29464287 .008928572 .8303571 .3392857 .08035714 .29464287 18 2004 480 39.98182 42.15254 . .5084746 .9322034 .06779661 .033898305 .40677965 .23728813 .18644068 .16949153 0 .8305085 .27118644 .11864407 .3389831 18 2005 480 35.792683 39.48864 . .53409094 .9090909 .0909091 .06818182 .1904762 .3809524 .1547619 .13095239 .14285715 .875 .27272728 .10227273 .29545453 18 2006 480 37.614582 41 . .5233645 .9813084 .01869159 .06542056 .24752475 .2970297 .21782178 .10891089 .12871288 .8878505 .3084112 .12149533 .3271028 18 2007 480 38.35571 42.28205 . .53846157 .9935898 0 .08333334 .14285715 .3265306 .2244898 .13605443 .17006803 .9166667 .4423077 .1025641 .4423077 18 2008 480 39.39024 38.14943 . .54022986 .9885057 0 .03448276 .26506025 .1566265 .27710843 .10843374 .19277108 .9195402 .3333333 .12643678 .3908046 18 2009 480 33.85294 41.89542 . .4901961 .9607843 .006535948 .08496732 .21276596 .25531915 .29078013 .14893617 .09219858 .9084967 .3006536 .13071896 .3921569 18 2010 480 37.5 43.19728 . .4829932 .9183673 .06122449 .08843537 .18367347 .292517 .292517 .1292517 .10204082 .9251701 .3605442 .13605443 .4353741 18 end
Here is how I get the synthetic control weights:
Code:
bysort metarea: gen nyear=[_N] keep if nyear == 18 tsset metarea year synth ahrsworkt age cinethp male white black foreign_born faminc_0025 faminc_2550 faminc_5075 faminc_75100 faminc_100m hs_grad bachelors advanced_degree white_collar, trunit(3760) trperiod(2012) fig keep(synthetic)
Code:
reg ahrsworkt kc post2012 interact_kc trend_kc if (metarea == 3760 | metarea == 7040) , r
Comment