hello everyone.
Ive compiled data on a large amount of countries to perform synthetic control.
yesterday i was running synthetic control on life expectancy with my control variables being GDP GNI population and unemployment. This was working. then I wanted to perform synthetic control on homicides with the same controls as this is what i was mainly interested in. Since there were gaps in my homicide data the code wouldn't run. So today i collected a bunch of homicide data with countries that had no gaps. yet when i run my synth command shown below
synth homicide GDP GNI Population Unemployement, trunit (32) trperiod(2016) xperiod(2005(1)2015) nested fig
i get
First Step: Data Setup
-------------------------------------------------------------------------------------------
St: operator invalid
r(198);
and the code doesnt run.
attached below are the two excel sheets. The first one will run synthetic control on life expectancy the new synthetic control sheet is the one that is giving me the operator invalid.
i can load both data sets in stata and am able to get them balanced by typing tsset Country Year
any help would be very much appreciated.
0 Response to help with Synthetic control
Post a Comment