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
merging survey data files - duplicate data problemDear All, I am working on two survey datasets and have encountered the same problem in the small da…
xttrans2 - calculating transitional probabilities for multiple years.Hi, I'm a little confused with regards to the xttrans2 command and obtaining transitional probabilit…
graph that shows the evolution over 10 yearsHi guys, We have drawn 10 individual histograms for working hours from 2004 to 2013 in Belgium. No…
Generate new variable without duplicatesHello I have one problem, I need to create a new variable: One extrait of my dataset is the followi…
Combine roc curvesI have two ROC curves each one is derived from a totally different model and interested in combining…
Subscribe to:
Post Comments (Atom)
0 Response to Create new variable of survey data
Post a Comment