I have a dataset with years, quarters, the 50 states, and other variables like income (MHI). I have created a value yq, from,gen yq = yq(year, quarter). I then rounded yq to be a whole number. My states are listed under state_id as 1 to 50. I have done xtset state_id yq and Stata recognizes it as :
Panel variable: state_id (strongly balanced)
Time variable: yq, 68 to 260, but with gaps
Delta: 1 unit
I am now trying to run synth2 command as follows:
synth2 MHI, trunit(23) trperiod(220) xperiod(181(1)219).
It keeps saying invalid syntax. I think the issue is trperiod, but the numbers are whole numbers. I have also tried doing egen State1 = group(state_id), and then using State1 as the xtset, but that also has not worked. I am happy to add any more info if that is helpful, but i I don't know why it keeps saying invalid syntax.
Panel variable: state_id (strongly balanced)
Time variable: yq, 68 to 260, but with gaps
Delta: 1 unit
I am now trying to run synth2 command as follows:
synth2 MHI, trunit(23) trperiod(220) xperiod(181(1)219).
It keeps saying invalid syntax. I think the issue is trperiod, but the numbers are whole numbers. I have also tried doing egen State1 = group(state_id), and then using State1 as the xtset, but that also has not worked. I am happy to add any more info if that is helpful, but i I don't know why it keeps saying invalid syntax.
Comment