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
- Managing time factor in repeated-measures ANOVAHello, I'm analysing data from a protocol which in fact works under the same structure as described …
- pvar with system gmmcan somebody help me with command for panel var using system GMM?? …
- Inserting blank rows at specific observations in datasetI am trying to manipulate a text (.tex) document (a multiple-choice exam) in Stata, which I realize …
- Error when using medsem command in simultaneous group SEM estimationHi all, I am running a between groups SEM with multiple mediators. In one group there is a signific…
- Oaxaca Decomposition Explanied % of Each VariableI have 500 observation and 4 treatment (x,y,z,t) and 15 variable. I would like Oaxaca Decomposition …
Subscribe to:
Post Comments (Atom)
0 Response to Create new variable of survey data
Post a Comment