I am trying to run a simple synthetic control experiment using the "synth" command on a dataset containing monthly data. From https://www.stata.com/statalist/arch.../msg01164.html I was able to determine a (very unintuitive) way to express monthly dates. My command is:
However, I then get the error
I then tried:
and I got
.
What am I doing wrong? This should be a very simple command which uses the same variable (ra) for the independent and dependent variables, with 44 as the control unit, and a pre-treatment period of 12/1980 to 11/1990.
As a side note, this method of expressing monthly dates seems needlessly complicated to me. I find that there are many such instances in STATA where convoluted expressions are needed to obtain simple outputs. I would be interested in seeing an explanation of why this difficult to use syntax is necessary if one exists.
Code:
synth ra(`=tm(1980m12)'(3)`=tm(1990m11)') ra, trunit(44) trperiod(`=tm(1990m12)')
ra(251(3)370) does not exist as a (numeric) variable in dataset
Code:
synth ra ra, trunit(44) trperiod(`=tm(1990m12)') xperiod(`=tm(1980m12)'(3)`=tm(1990m11)')
expression too long
What am I doing wrong? This should be a very simple command which uses the same variable (ra) for the independent and dependent variables, with 44 as the control unit, and a pre-treatment period of 12/1980 to 11/1990.
As a side note, this method of expressing monthly dates seems needlessly complicated to me. I find that there are many such instances in STATA where convoluted expressions are needed to obtain simple outputs. I would be interested in seeing an explanation of why this difficult to use syntax is necessary if one exists.
Comment