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!
Related Posts with Create new variable of survey data
Comparing string variable namesI have a variable named S_Kx, S_Jx S_Yx, S_Sx I want to nix all variables that dont' have the same …
matching variables in the varlist with parameters is needed in 'ln'?I want to estimate equation below with 'ln' command and the program. But it returns error message 19…
Taking a log of Ratio VariableHi, I am conducting a panel data analysis. My dependent variable is a ratio which defines the busin…
Marginal effect manually for IV-TobitDear Statalist I have gone through Tobit model in very a detailed way but reached a dead-end in try…
Clean a dataset with the same IDI have one dataset with a ID variable and three different variables, age, height, and weight). ID…
Subscribe to:
Post Comments (Atom)
0 Response to Create new variable of survey data
Post a Comment