Hello Statalist,
I am doing an evaluation of a policy in the United States, by studying its effect on voting behavior at the individual level. My outcome variable is thus an indicator that takes the value of 1 if that individual voted in that year's election, 0 otherwise.
My data series of repeated cross-sections, spaced out every two years between 2004 and 2020. The policy started in 2012 and a problematic factor is that treatment is defined on an individual level. Individuals are considered "treated" (I am working towards ITT estimates) if they meet certain income criteria.
My goal is to implement the semiparametric DiD estimator proposed by Abadie (2005, Review of Economic Studies), applied to repeated cross-section data and generalized to several periods. For this purpose, I turn to the - csdid - package.
I am able to implement a 2x2 design using - drdid - with the following command (post takes the value of 1 if year >= 2012):
.
To generalize this to several periods, I turned to the csdid command, but I am having trouble with the gvar argument. I was initially using the following command:
but I honestly am not sure what kind of variable I should indicate in the gvar argument. I first defined first_treat as a variable that takes the value of the year if an individual is treated in that year, but I think this is wrong.
I may not even be correctly implementing this specification. I suspect the individual-level treatment indicator is problematic in this context, but I am somewhat inexperienced with DID with repeated cross-section so I am not sure.
Am I even correct in attempting this? If so, how should I define the gvar variable? I have read through csdid's documentation and I know it is meant to indicate the period in which an observation is first treated, but given that I am using repeated cross-sections, I am not sure how this is relevant because each individual is only observed during one period.
I am using Stata 17 SE on a Windows PC.
Thank you.
I am doing an evaluation of a policy in the United States, by studying its effect on voting behavior at the individual level. My outcome variable is thus an indicator that takes the value of 1 if that individual voted in that year's election, 0 otherwise.
My data series of repeated cross-sections, spaced out every two years between 2004 and 2020. The policy started in 2012 and a problematic factor is that treatment is defined on an individual level. Individuals are considered "treated" (I am working towards ITT estimates) if they meet certain income criteria.
My goal is to implement the semiparametric DiD estimator proposed by Abadie (2005, Review of Economic Studies), applied to repeated cross-section data and generalized to several periods. For this purpose, I turn to the - csdid - package.
I am able to implement a 2x2 design using - drdid - with the following command (post takes the value of 1 if year >= 2012):
Code:
drdid votvar female black age agesq married yrseduc nchild state_unempld [weight = weightvar], time(post) tr(treated) all cluster(stateid)
To generalize this to several periods, I turned to the csdid command, but I am having trouble with the gvar argument. I was initially using the following command:
Code:
csdid votvar female black age agesq married yrseduc nchild state_unempld [weight = weightvar], time(year) gvar(first_treat) ipw cluster(stateid)
I may not even be correctly implementing this specification. I suspect the individual-level treatment indicator is problematic in this context, but I am somewhat inexperienced with DID with repeated cross-section so I am not sure.
Am I even correct in attempting this? If so, how should I define the gvar variable? I have read through csdid's documentation and I know it is meant to indicate the period in which an observation is first treated, but given that I am using repeated cross-sections, I am not sure how this is relevant because each individual is only observed during one period.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input int year byte(post votvar) float treated byte stateid double weightvar byte(female black age) int agesq byte(married yrseduc nchild) float state_unempld 2004 0 1 1 1 2623.443 1 0 38 1444 1 14 2 .068462305 2004 0 . 1 1 2722.3819 1 0 32 1024 1 12 2 .068462305 2004 0 1 1 1 2429.3012 0 0 36 1296 1 16 1 .068462305 2004 0 1 1 1 2749.4369 0 0 41 1681 1 16 2 .068462305 2004 0 1 1 1 2623.443 1 0 35 1225 1 16 1 .068462305 2004 0 1 0 1 2469.438 1 0 43 1849 1 16 1 .068462305 2004 0 1 0 1 2661.5829 0 0 51 2601 1 13 1 .068462305 2006 0 0 1 1 2324.241 1 0 33 1089 1 12 2 .064763226 2006 0 1 1 1 3084.0646 1 0 40 1600 1 13 2 .064763226 2006 0 1 1 1 3176.7826 1 0 45 2025 1 16 2 .064763226 2006 0 1 1 1 2802.3992 0 1 38 1444 1 16 2 .064763226 2006 0 0 1 1 2577.4423 1 0 25 625 1 12 1 .064763226 2006 0 1 1 1 3593.7706 0 0 48 2304 1 16 2 .064763226 2006 0 0 1 1 2661.4183 0 0 34 1156 1 12 1 .064763226 2006 0 1 1 1 2480.7861 1 1 38 1444 1 13 2 .064763226 2006 0 . 1 1 3176.7826 1 0 47 2209 0 12 1 .064763226 2006 0 1 0 1 2410.8311 1 0 35 1225 0 12 1 .064763226 2006 0 0 1 1 2428.1492 0 0 34 1156 1 13 2 .064763226 2008 0 1 1 1 3323.5928 0 0 61 3721 1 16 2 .068048485 2008 0 0 0 1 3650.3775 0 0 49 2401 1 13 1 .068048485 2008 0 1 1 1 2989.0131 1 0 47 2209 1 17 2 .068048485 2008 0 1 0 1 2989.0131 1 0 46 2116 1 12 1 .068048485 2008 0 1 1 1 3671.8115 0 0 39 1521 1 14 1 .068048485 2008 0 1 1 1 3892.0033 1 0 37 1369 1 16 2 .068048485 2008 0 1 1 1 2782.015 0 0 35 1225 1 13 2 .068048485 2008 0 0 1 1 3273.7527 0 0 41 1681 1 13 2 .068048485 2008 0 1 1 1 3156.2368 1 0 31 961 1 16 1 .068048485 2008 0 . 1 1 3026.6301 1 0 25 625 1 12 2 .068048485 2008 0 . 1 1 3754.9383 0 0 26 676 1 10 2 .068048485 2008 0 1 1 1 2853.1402 1 0 39 1521 1 16 2 .068048485 2010 0 . 0 1 2637.3475 0 0 45 2025 1 17 1 .11254114 2010 0 1 0 1 2925.8712 1 0 45 2025 1 13 1 .11254114 2010 0 . 0 1 2581.067 1 0 49 2401 1 16 1 .11254114 2010 0 . 1 1 2813.3854 1 0 37 1369 0 5 3 .11254114 2010 0 0 0 1 3418.3679 0 0 49 2401 1 17 1 .11254114 2010 0 . 0 1 2577.1412 1 0 42 1764 1 13 1 .11254114 2010 0 . 0 1 2552.9962 1 0 34 1156 1 13 1 .11254114 2010 0 . 0 1 3418.3679 0 0 47 2209 1 12 1 .11254114 2010 0 . 0 1 2116.2538 0 0 45 2025 1 11 1 .11254114 2012 1 1 0 1 3519.0209 0 0 46 2116 1 17 2 .09638353 2012 1 1 0 1 2817.1964 1 0 42 1764 1 16 2 .09638353 2012 1 0 0 1 3143.4283 0 0 41 1681 0 12 2 .09638353 2012 1 0 0 1 3206.4962 0 0 43 1849 0 13 2 .09638353 2012 1 1 0 1 3584.0283 0 0 42 1764 1 12 1 .09638353 2012 1 1 1 1 3677.8484 1 0 34 1156 1 12 2 .09638353 2012 1 0 0 1 2865.6223 1 0 36 1296 0 12 2 .09638353 2012 1 1 0 1 2851.6203 1 0 34 1156 1 16 2 .09638353 2012 1 1 0 1 3626.2316 1 0 47 2209 1 13 1 .09638353 2012 1 1 0 1 2827.5482 0 0 41 1681 1 16 1 .09638353 2012 1 1 0 1 3269.7352 0 0 35 1225 1 16 2 .09638353 2012 1 1 0 1 2918.4123 1 0 47 2209 1 13 2 .09638353 2012 1 1 1 1 3324.0039 0 0 36 1296 1 13 2 .09638353 2012 1 0 0 1 3519.0209 0 0 45 2025 0 12 2 .09638353 2012 1 1 0 1 3833.862 0 0 49 2401 1 17 2 .09638353 2012 1 1 0 1 3447.875 1 0 28 784 1 13 1 .09638353 2012 1 0 0 1 2725.3815 1 0 51 2601 1 17 3 .09638353 2014 1 . 1 1 2188.7591 1 0 51 2601 1 13 2 .08329498 2014 1 0 0 1 1492.99 0 0 60 3600 1 20 1 .08329498 2014 1 . 1 1 3370.5631 0 0 55 3025 1 13 2 .08329498 2014 1 1 0 1 1670.9967 0 0 52 2704 1 17 1 .08329498 2014 1 0 0 1 1831.7712 0 1 39 1521 1 16 1 .08329498 2014 1 0 0 1 1532.8349 1 0 45 2025 1 16 1 .08329498 2014 1 1 1 1 1882.3686 1 1 36 1296 0 10 3 .08329498 2014 1 1 0 1 2316.1321 0 0 34 1156 0 13 1 .08329498 2014 1 0 1 1 1832.7644 1 0 46 2116 0 16 2 .08329498 2014 1 . 0 1 1412.5225 1 0 37 1369 1 13 2 .08329498 2014 1 1 0 1 1861.0222 1 0 42 1764 1 16 2 .08329498 2014 1 0 0 1 1417.4637 0 0 40 1600 1 13 2 .08329498 2014 1 1 0 1 2060.7882 0 0 44 1936 1 17 2 .08329498 2014 1 1 0 1 1752.6919 1 0 52 2704 1 9 1 .08329498 2014 1 0 0 1 2438.8565 0 0 53 2809 1 13 2 .08329498 2014 1 1 0 1 1699.9555 1 1 37 1369 1 16 1 .08329498 2016 1 1 1 1 1667.8133 0 0 43 1849 1 12 2 .06175678 2016 1 1 0 1 1447.7026 1 0 52 2704 0 16 1 .06175678 2016 1 1 1 1 1320.0783 1 0 36 1296 1 17 2 .06175678 2016 1 1 0 1 1959.0251 0 0 31 961 0 16 1 .06175678 2016 1 1 0 1 2050.7085 1 0 32 1024 1 13 1 .06175678 2016 1 0 0 1 1623.5081 1 0 45 2025 0 16 2 .06175678 2016 1 1 1 1 2284.904 1 0 38 1444 1 13 2 .06175678 2016 1 0 0 1 1373.7601 1 0 33 1089 1 12 2 .06175678 2016 1 1 1 1 1334.1652 1 0 44 1936 0 16 1 .06175678 2016 1 1 1 1 1590.1385 0 0 39 1521 1 17 2 .06175678 2016 1 1 0 1 1603.083 0 0 35 1225 1 12 2 .06175678 2016 1 1 0 1 1690.5178 0 0 34 1156 1 13 1 .06175678 2016 1 0 0 1 1320.0783 1 0 37 1369 0 11 1 .06175678 2018 1 0 0 1 1889.1662 0 0 46 2116 1 12 2 .05406519 2018 1 1 0 1 1824.2471 1 0 30 900 1 14 2 .05406519 2018 1 1 0 1 1682.9579 0 0 40 1600 1 16 2 .05406519 2018 1 1 0 1 1677.085 0 0 32 1024 1 13 2 .05406519 2018 1 1 0 1 1889.1662 0 0 49 2401 1 13 2 .05406519 2018 1 1 1 1 1656.8716 0 0 58 3364 1 17 2 .05406519 2018 1 1 0 1 1828.8339 1 0 44 1936 1 16 2 .05406519 2018 1 . 0 1 1910.1095 1 0 29 841 1 16 2 .05406519 2018 1 1 1 1 1978.0334 1 0 47 2209 1 16 2 .05406519 2018 1 0 0 1 1732.7991 1 0 35 1225 1 16 1 .05406519 2018 1 0 0 1 1600.3391 0 0 45 2025 1 14 1 .05406519 2018 1 0 1 1 1716.7169 1 0 39 1521 0 12 3 .05406519 2018 1 0 0 1 1657.2191 1 0 45 2025 1 13 2 .05406519 2018 1 . 0 1 1543.8662 0 0 31 961 1 16 2 .05406519 2018 1 1 0 1 1896.5009 1 0 45 2025 1 16 2 .05406519 end label values age AGE label def AGE 25 "25", modify label def AGE 26 "26", modify label def AGE 28 "28", modify label def AGE 29 "29", modify label def AGE 30 "30", modify label def AGE 31 "31", modify label def AGE 32 "32", modify label def AGE 33 "33", modify label def AGE 34 "34", modify label def AGE 35 "35", modify label def AGE 36 "36", modify label def AGE 37 "37", modify label def AGE 38 "38", modify label def AGE 39 "39", modify label def AGE 40 "40", modify label def AGE 41 "41", modify label def AGE 42 "42", modify label def AGE 43 "43", modify label def AGE 44 "44", modify label def AGE 45 "45", modify label def AGE 46 "46", modify label def AGE 47 "47", modify label def AGE 48 "48", modify label def AGE 49 "49", modify label def AGE 51 "51", modify label def AGE 52 "52", modify label def AGE 53 "53", modify label def AGE 55 "55", modify label def AGE 58 "58", modify label def AGE 60 "60", modify label def AGE 61 "61", modify label values nchild NCHILD label def NCHILD 1 "1 child present", modify label def NCHILD 2 "2", modify label def NCHILD 3 "3", modify
Thank you.
Comment