Dear All,
I am struggling to generate a range of variables (time variables) to perform an analysis. A little bit of background I am working with time-series data performing analysis which strategy is to divide the dataset between periods of analysis (before/after a policy adoption). I have been trying to use the in-range function but I could not find a way to make work.
In order to generate my time variable I apply the following code:
//Generate time variable (monthly)
generate time = m(1997m1) + _n-1
format time %tm
tsset time
In order to assess my analysis, I would need to split the range
before = from 1997m1 to 2011m4
after = 2011m5 to 2019m12
Could someone help me please!
I am struggling to generate a range of variables (time variables) to perform an analysis. A little bit of background I am working with time-series data performing analysis which strategy is to divide the dataset between periods of analysis (before/after a policy adoption). I have been trying to use the in-range function but I could not find a way to make work.
In order to generate my time variable I apply the following code:
//Generate time variable (monthly)
generate time = m(1997m1) + _n-1
format time %tm
tsset time
In order to assess my analysis, I would need to split the range
before = from 1997m1 to 2011m4
after = 2011m5 to 2019m12
Could someone help me please!
Comment