Hello,
My name is Christian and I am just beginning as a user of STATA. My question might be a bit silly, however I really need your help since I got stuck and I'm just learning this software. Well, I have a database where "a2" is a numeric variable that every observation such as Cordoba has a value of 4, Buenos Aires a value of 1 and so on. I need to assign a different value to each observation, therefore I created a new variable "ciudad". This new variable is a string variable and now I want to assign to these variable's observations different values, such as for Buenos Aires 9, Cordoba 10, Mendoza 11, etc.
Array
Once I got that done, I will drop "a2" because I need to append more data bases to this one with the same variables but with different scenarios and when I do it, the values overlap. For example, this data base is Argentina and when I append Bolivia, the values of "a2" overlap and the Bolivian cities such a La Paz, Sucre, etc that have the same values such as 4, 1, etc automatically are converted to Buenos Aires, Cordoba, etc adopting the values of the Argentinian Database.
How can I do it?
Thanks and kind regards.
Christian Rojas
Related Posts with Define value label tand conver it to from a string variable to a numeric one
Survey Data - Logistic regression with numerical variableArray Array Hello all, I am currently carrying out an analysis on repeated cross sectional data. I c…
Fixed and Random Effects with Unit root testHello, I want to ask if I performing the Fixed Effects and Random Effects for the models of the stu…
Count number of occurences by dayDear all, I have a dataset like this with three variables (Start_Day=Start day of a work contract; E…
diagnostic or post-estimation model validity test: Tobit random effect model for Panel dataDear Statalist, I want to estimate the effect of endowment on charity contribution. My dependent va…
strata variable vs. covariateHello, I am using svyset , svy: glm. I am using state as my strata variable. When creating my multi…
Subscribe to:
Post Comments (Atom)
0 Response to Define value label tand conver it to from a string variable to a numeric one
Post a Comment