Hi all,
I have a panel dataset from 1974-2014 set to xtreg. I have created a dummy variable ("suffrage_dummy") that takes the value 1 for the year of the introduction of universal suffrage (between this period 1974-2014). I have generated another dummy variable ("suffrage_dummy2") that takes the same value as "suffrage_dummy". I want to replace the values of this "suffrage_dummy2" variable with value 0 conditional on two criteria:
1. if the year is higher than the establishment of universal suffrage AND
2. if the average in range (for those years higher than the one when the suffrage is introduced) is lower than 1.
I was looking at these two sites for inspiration :
Any help will be much appreciated.
Ashvinder
I have a panel dataset from 1974-2014 set to xtreg. I have created a dummy variable ("suffrage_dummy") that takes the value 1 for the year of the introduction of universal suffrage (between this period 1974-2014). I have generated another dummy variable ("suffrage_dummy2") that takes the same value as "suffrage_dummy". I want to replace the values of this "suffrage_dummy2" variable with value 0 conditional on two criteria:
1. if the year is higher than the establishment of universal suffrage AND
2. if the average in range (for those years higher than the one when the suffrage is introduced) is lower than 1.
I was looking at these two sites for inspiration :
HTML Code:
https://www.stata.com/statalist/archive/2004-02/msg00759.html#
HTML Code:
https://stats.idre.ucla.edu/stata/modules/creating-and-recoding-variables/
Ashvinder
Comment