Dear all,
I am estimating the effect of a school reform on labor market outcomes using panel data. Since the reform (that cut one year of high school education) was implemented in a staggered way across different federal states, I decided to use csdid.
Now I am facing problems with defining the time () and gvar () variable to run the command properly.
I ran csdid with ivar(person_id), time(grad_year) and gvar(g8_grad_year). The variable "grad_year" describes the year in which a person graduated, "g8_grad_year" is defined as the first year in which students graduated with one year less schooling, indicating the start of the treatment in every federal state.
My code therefore looks like this:
Stata is now constantly giving me the following error
I do have a lot of never treated individuals since my panel includes plenty of older individuals that graduated way before the reform was implemented.
But somehow Stata does not use them as a control group, even though they should be identified through my time variable (if individual_graduation_year < first_g8_grads_in_fed_state). Does anyone know why this is happening?
I am very grateful for any thoughts on this issue!
Best,
Frida
I am estimating the effect of a school reform on labor market outcomes using panel data. Since the reform (that cut one year of high school education) was implemented in a staggered way across different federal states, I decided to use csdid.
Now I am facing problems with defining the time () and gvar () variable to run the command properly.
I ran csdid with ivar(person_id), time(grad_year) and gvar(g8_grad_year). The variable "grad_year" describes the year in which a person graduated, "g8_grad_year" is defined as the first year in which students graduated with one year less schooling, indicating the start of the treatment in every federal state.
My code therefore looks like this:
Code:
gen gym_start_year = birthdate + 10 // defining the year in which kids transition to secondary school gen g8_grad_year = . replace g8_grad_year = 2011 if school_fedstate == 8 & gym_start_year >= 2003 replace g8_grad_year = 2011 if school_fedstate == 9 & gym_start_year >= 2003 replace g8_grad_year = 2012 if school_fedstate == 11 & gym_start_year >= 2004 replace g8_grad_year = 2012 if school_fedstate == 12 & gym_start_year >= 2006 replace g8_grad_year = 2011 if school_fedstate == 4 & gym_start_year >= 2003 replace g8_grad_year = 2010 if school_fedstate == 2 & gym_start_year >= 2002 replace g8_grad_year = 2011 if school_fedstate == 13 & gym_start_year >= 2003 replace g8_grad_year = 2011 if school_fedstate == 3 & gym_start_year >= 2003 replace g8_grad_year = 2012 if school_fedstate == 5 & gym_start_year >= 2004 replace g8_grad_year = 2009 if school_fedstate == 10 & gym_start_year >= 1999 replace g8_grad_year = 2010 if school_fedstate == 15 & gym_start_year >= 2001 replace g8_grad_year = 2014 if school_fedstate == 1 & gym_start_year >= 2006 csdid income controls, ivar(person_id) time(grad_year) gvar(g8_grad_year) method(dripw)
No never treated observations found. Using Not yet treated data
Units always treated found. These will be ignored. Panel is not balanced.
Will use observations with Pair balanced (observed at t0 and t1)
Units always treated found. These will be ignored. Panel is not balanced.
Will use observations with Pair balanced (observed at t0 and t1)
But somehow Stata does not use them as a control group, even though they should be identified through my time variable (if individual_graduation_year < first_g8_grads_in_fed_state). Does anyone know why this is happening?
I am very grateful for any thoughts on this issue!
Best,
Frida
Comment