Hi Statalist,
I am currently working on my final thesis on whether democracies pursue a higher tax rate than autocracies. Therefore I have a list of countries with the top tax rate and how democratic (from 0 = completely autocratic to 4 = liberal democracy) a country was in that year.
Now I want to avoid writing a query for each country. How do I generalize the following sequence:
Thank you!
I am currently working on my final thesis on whether democracies pursue a higher tax rate than autocracies. Therefore I have a list of countries with the top tax rate and how democratic (from 0 = completely autocratic to 4 = liberal democracy) a country was in that year.
Now I want to avoid writing a query for each country. How do I generalize the following sequence:
Code:
gen DE_AUTO = . gen DE_DEMO = . forvalues year = 1900/2023 { replace DE_DEMO = DE_PIT if DE_SYS >= 2 replace DE_AUTO = DE_PIT if DE_SYS < 2 }
Comment