Hi,
I am using the Synthetic Control Method to analyze my research and am trying to use the commands "synth" and "synth2". However, both commands return the error "treatment period not found in timevar". I have verified that the time period exists for all items. I would be grateful for any assistance. Thank you.
My commands are as follows:
"
Panel variable: it (strongly balanced)
Time variable: mdate, 200501 to 202405
Delta: 1 month
"
"invalid trperiod() -- treatment period not found in timelvar
r(198);
"
I am using the Synthetic Control Method to analyze my research and am trying to use the commands "synth" and "synth2". However, both commands return the error "treatment period not found in timevar". I have verified that the time period exists for all items. I would be grateful for any assistance. Thank you.
My commands are as follows:
gen mon=0
replace mon=01 if month=="Jan"
replace mon=02 if month=="Feb"
replace mon=03 if month=="Mar"
replace mon=04 if month=="Apr"
replace mon=05 if month=="May"
replace mon=06 if month=="Jun"
replace mon=07 if month=="Jul"
replace mon=08 if month=="Aug"
replace mon=09 if month=="Sep"
replace mon=10 if month=="Oct"
replace mon=11 if month=="Nov"
replace mon=12 if month=="Dec"
gen mdate=ym(year, mon)
format mdate %tmCCYYNN
xtset it mdate
replace mon=01 if month=="Jan"
replace mon=02 if month=="Feb"
replace mon=03 if month=="Mar"
replace mon=04 if month=="Apr"
replace mon=05 if month=="May"
replace mon=06 if month=="Jun"
replace mon=07 if month=="Jul"
replace mon=08 if month=="Aug"
replace mon=09 if month=="Sep"
replace mon=10 if month=="Oct"
replace mon=11 if month=="Nov"
replace mon=12 if month=="Dec"
gen mdate=ym(year, mon)
format mdate %tmCCYYNN
xtset it mdate
Panel variable: it (strongly balanced)
Time variable: mdate, 200501 to 202405
Delta: 1 month
"
synth2 price item, trunit(1) trperiod(202203)
r(198);
"
Comment