Hi Stata Lovers,
I am using the SDID command to perform a synthetic control, difference-in-difference on the individual level data using the following command.
sdid quality state year treated, vce(bootstrap) covariates(education wealth) graph
I am getting following error.
“repeated time values within panel”
I have the following questions regarding this command.
----------------------- copy starting from the next line -----------------------
[CODE]
* Example generated by -dataex-. For more info, type help dataex
clear
input str15 caseid float(quality state) byte(wealth education) int year float(treated treatment)
" 07010620 01" 0 1 1 0 2011 1 0
" 07053475 02" 0 1 4 10 2011 1 0
" 07039679 02" 0 1 1 5 2011 1 0
" 07062097 02" 0 1 2 3 2011 1 0
" 07011050 02" 0 1 3 7 2016 1 1
" 07046119 02" 1 1 1 0 2011 1 0
" 07059056 02" 0 1 1 6 2011 1 0
" 07013006 04" 1 1 4 12 2011 1 0
" 07014430 02" 0 1 4 7 2018 1 1
" 07084001 02" 0 1 1 4 2011 1 0
" 07071186 08" 0 1 3 1 2018 0 0
" 07082027 02" 0 1 3 5 2019 1 1
" 07007234 02" 0 1 3 8 2011 1 0
" 07077928 02" 0 1 1 3 2020 0 0
" 07055459 02" 0 1 1 5 2021 1 1
" 07038595 08" 0 1 2 5 2011 1 0
" 07054441 03" 0 1 5 12 2011 1 0
" 07104808 03" 0 1 3 8 2011 1 0
" 07056183 02" 0 1 1 3 2011 1 0
" 07025259 02" 0 1 1 4 2011 1 0
" 07025359 02" 0 1 2 8 2011 1 0
" 07065109 02" 0 1 5 5 2011 1 0
" 07073581 06" 0 1 2 0 2011 1 0
" 07000219 02" 1 1 1 0 2011 1 0
" 07021937 02" 1 1 1 0 2011 1 0
" 07045416 04" 0 1 1 3 2011 1 0
" 07044204 04" 1 1 2 0 2011 1 0
" 07016332 02" 1 1 2 6 2011 1 0
" 07092891 02" 1 1 1 0 2011 1 0
" 07040634 02" 0 1 2 0 2011 1 0
" 07041366 02" 0 1 4 2 2011 1 0
" 07027310 04" 1 1 3 7 2011 1 0
" 07058348 02" 1 1 2 0 2011 1 0
" 07008565 02" 0 1 1 0 2011 1 0
" 07076575 02" 0 1 1 0 2011 1 0
" 07045223 02" 0 1 4 5 2011 1 0
" 07054028 02" 0 1 1 6 2011 1 0
" 07100051 02" 0 1 3 5 2011 1 0
" 07012511 03" 1 1 4 9 2011 1 0
" 07071093 02" 1 1 2 0 2011 1 0
" 07082351 02" 0 1 5 5 2011 1 0
" 07051074 02" 0 1 1 0 2011 1 0
" 07010397 02" 1 1 1 0 2014 1 0
" 07011950 02" 0 1 3 6 2011 1 0
" 07042812 02" 0 1 1 0 2011 1 0
" 07035515 02" 0 1 2 0 2018 1 1
I am using the SDID command to perform a synthetic control, difference-in-difference on the individual level data using the following command.
sdid quality state year treated, vce(bootstrap) covariates(education wealth) graph
I am getting following error.
“repeated time values within panel”
- The outcome variable ‘quality’ is binary: ‘quality care provided; yes == 1 and no == 0’.
- Group variable- state- representing various states of India. The intervention was applied to only some states
- The 'treated' variable is binary, representing a state (region) that was ‘exposed to treatment; yes == 1 or no == 0’.
- Period of intervention= 1 if year >= 2016 (data from year 2010 to 2021).
- Variable treatment, represent which unit received treatment at what time ( treatment =1 if treated ==1 & year >= 2016)
I have the following questions regarding this command.
- Is there a way if the SDID command can be used for individual-level data for a binary outcome variable?
- How can I convert my individual-level data, to balance panel data i.e., the percentage of patients who received quality care in each state every year (from 2010 to 2021)?
- If I cannot use SDID, is there another command for Synthetic Control DiD for individual-level data?
----------------------- copy starting from the next line -----------------------
[CODE]
* Example generated by -dataex-. For more info, type help dataex
clear
input str15 caseid float(quality state) byte(wealth education) int year float(treated treatment)
" 07010620 01" 0 1 1 0 2011 1 0
" 07053475 02" 0 1 4 10 2011 1 0
" 07039679 02" 0 1 1 5 2011 1 0
" 07062097 02" 0 1 2 3 2011 1 0
" 07011050 02" 0 1 3 7 2016 1 1
" 07046119 02" 1 1 1 0 2011 1 0
" 07059056 02" 0 1 1 6 2011 1 0
" 07013006 04" 1 1 4 12 2011 1 0
" 07014430 02" 0 1 4 7 2018 1 1
" 07084001 02" 0 1 1 4 2011 1 0
" 07071186 08" 0 1 3 1 2018 0 0
" 07082027 02" 0 1 3 5 2019 1 1
" 07007234 02" 0 1 3 8 2011 1 0
" 07077928 02" 0 1 1 3 2020 0 0
" 07055459 02" 0 1 1 5 2021 1 1
" 07038595 08" 0 1 2 5 2011 1 0
" 07054441 03" 0 1 5 12 2011 1 0
" 07104808 03" 0 1 3 8 2011 1 0
" 07056183 02" 0 1 1 3 2011 1 0
" 07025259 02" 0 1 1 4 2011 1 0
" 07025359 02" 0 1 2 8 2011 1 0
" 07065109 02" 0 1 5 5 2011 1 0
" 07073581 06" 0 1 2 0 2011 1 0
" 07000219 02" 1 1 1 0 2011 1 0
" 07021937 02" 1 1 1 0 2011 1 0
" 07045416 04" 0 1 1 3 2011 1 0
" 07044204 04" 1 1 2 0 2011 1 0
" 07016332 02" 1 1 2 6 2011 1 0
" 07092891 02" 1 1 1 0 2011 1 0
" 07040634 02" 0 1 2 0 2011 1 0
" 07041366 02" 0 1 4 2 2011 1 0
" 07027310 04" 1 1 3 7 2011 1 0
" 07058348 02" 1 1 2 0 2011 1 0
" 07008565 02" 0 1 1 0 2011 1 0
" 07076575 02" 0 1 1 0 2011 1 0
" 07045223 02" 0 1 4 5 2011 1 0
" 07054028 02" 0 1 1 6 2011 1 0
" 07100051 02" 0 1 3 5 2011 1 0
" 07012511 03" 1 1 4 9 2011 1 0
" 07071093 02" 1 1 2 0 2011 1 0
" 07082351 02" 0 1 5 5 2011 1 0
" 07051074 02" 0 1 1 0 2011 1 0
" 07010397 02" 1 1 1 0 2014 1 0
" 07011950 02" 0 1 3 6 2011 1 0
" 07042812 02" 0 1 1 0 2011 1 0
" 07035515 02" 0 1 2 0 2018 1 1
Comment