Hello.
I'm working with survey data from the Eurobarometer survey. I want to create a new variable, which will assign countries values based on Freedom House rankings for government transparency.
I have tried using this code: generate govt = 3 if cntry_eu == 2, govt = 4 if cntry_eu == 3, govt = 2 if cntry_eu == 4 ........ etc.
But stata only recognise one line of code, and when I tabulate the new variable it gives me the number of induviduals within that first country.
How can I add on more values? And is it possible to add labels to the numeric country codes in the creating of the new variable, so that the results are easier to interpret?
Many thanks for all kinds of help!
0 Response to Create new variable of survey data
Post a Comment