Hi everyone,
I am trying to get csdid working and I keep getting 0 estimates.
My dataset is individual and it contains birth records including month and year of birth. It goes from 1997 to 2001. My outcome is below_avg_bw - a dummy capturing whether birth weight is below 3500 or not. I want to estimate a staggered did with csdid.
I created a time variable timevar which goes from 1 to 60, for the first month in my dataset it's 1 (January 1997), then second month 2 (Feb. 1997), etc. My data is repeated cross-section, and I want the see the impact of a policy which affected potentially child's birth weight for children born from June to October 1999. According to my definition of timevar, these are the months 30 to 34 in my dataset. So I set treat_month to 30 for every June, 31 for every July, etc. 34 for every October. All the other months in treat_month are set to 0.
When I run
csdid below_avg_bw, time(timevar) gvar(treat_month)
I get all 0 coefficients, see below just an extract, same for g32-34.
Outcome model : regression adjustment
Treatment model: none
------------------------------------------------------------------------------
| Coefficient Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
g30 |
t_1_2 | 0 (omitted)
t_2_3 | 0 (omitted)
t_3_4 | 0 (omitted)
t_4_5 | 0 (omitted)
t_5_6 | 0 (omitted)
t_6_7 | 0 (omitted)
t_7_8 | 0 (omitted)
t_8_9 | 0 (omitted)
t_9_10 | 0 (omitted)
t_10_11 | 0 (omitted)
t_11_12 | 0 (omitted)
t_12_13 | 0 (omitted)
t_13_14 | 0 (omitted)
t_14_15 | 0 (omitted)
t_15_16 | 0 (omitted)
t_16_17 | 0 (omitted)
t_17_18 | 0 (omitted)
t_18_19 | 0 (omitted)
t_19_20 | 0 (omitted)
t_20_21 | 0 (omitted)
This is what my data looks like:
Can someone please help me understand what I am doing wrong? Thank you so much!
Lara
I am trying to get csdid working and I keep getting 0 estimates.
My dataset is individual and it contains birth records including month and year of birth. It goes from 1997 to 2001. My outcome is below_avg_bw - a dummy capturing whether birth weight is below 3500 or not. I want to estimate a staggered did with csdid.
I created a time variable timevar which goes from 1 to 60, for the first month in my dataset it's 1 (January 1997), then second month 2 (Feb. 1997), etc. My data is repeated cross-section, and I want the see the impact of a policy which affected potentially child's birth weight for children born from June to October 1999. According to my definition of timevar, these are the months 30 to 34 in my dataset. So I set treat_month to 30 for every June, 31 for every July, etc. 34 for every October. All the other months in treat_month are set to 0.
When I run
csdid below_avg_bw, time(timevar) gvar(treat_month)
I get all 0 coefficients, see below just an extract, same for g32-34.
Outcome model : regression adjustment
Treatment model: none
------------------------------------------------------------------------------
| Coefficient Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
g30 |
t_1_2 | 0 (omitted)
t_2_3 | 0 (omitted)
t_3_4 | 0 (omitted)
t_4_5 | 0 (omitted)
t_5_6 | 0 (omitted)
t_6_7 | 0 (omitted)
t_7_8 | 0 (omitted)
t_8_9 | 0 (omitted)
t_9_10 | 0 (omitted)
t_10_11 | 0 (omitted)
t_11_12 | 0 (omitted)
t_12_13 | 0 (omitted)
t_13_14 | 0 (omitted)
t_14_15 | 0 (omitted)
t_15_16 | 0 (omitted)
t_16_17 | 0 (omitted)
t_17_18 | 0 (omitted)
t_18_19 | 0 (omitted)
t_19_20 | 0 (omitted)
t_20_21 | 0 (omitted)
This is what my data looks like:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte below_avg_bw float(timevar treat_month) 1 51 0 1 35 0 0 46 34 1 56 32 1 18 30 0 45 33 1 8 32 0 15 0 1 23 0 0 55 31 1 57 33 1 59 0 1 29 0 1 9 33 0 7 31 0 50 0 1 55 31 0 43 31 1 44 32 0 17 0 1 4 0 1 9 33 1 24 0 1 38 0 0 38 0 0 9 33 1 34 34 1 23 0 1 39 0 1 42 30 1 26 0 1 49 0 0 42 30 1 39 0 1 54 30 1 20 32 0 60 0 1 33 33 0 19 31 1 30 30 1 19 31 1 19 31 1 27 0 1 36 0 0 13 0 1 6 30 0 18 30 0 40 0 1 20 32 0 21 33 1 40 0 1 51 0 1 8 32 1 23 0 1 55 31 1 1 0 1 14 0 0 11 0 1 49 0 0 49 0 1 46 34 1 47 0 1 48 0 0 6 30 0 49 0 0 59 0 0 32 32 1 33 33 1 31 31 1 55 31 1 59 0 1 18 30 0 2 0 1 32 32 1 3 0 1 53 0 1 13 0 0 58 34 0 9 33 1 32 32 0 46 34 1 49 0 1 14 0 1 21 33 1 35 0 1 2 0 1 38 0 1 6 30 1 52 0 1 10 34 1 27 0 1 23 0 1 55 31 1 50 0 0 15 0 1 56 32 1 25 0 1 25 0 0 42 30 1 9 33 end
Lara
Comment