Hi. im trying to replace observations of a string variable from another string variable (Both the string variable contains data from multi select questions. Even though both the variables are string i get a message 0 real changes made.
The code im trying to run is replace var1 = var2 if var1 == "."
The data looks like below,
var 1
1 2 3
.
6 2 1
.
var 2
.
4 5 6
.
4 2 1
I would want a variable that looks like,
var1
1 2 3
4 5 6
6 2 1
4 2 1
Related Posts with Replacing String variables with another string variable. (String variables contain data from multi select questions)
problem with looping the command tabstatHell everyone, I want to observe the sd and mean of each of the countries in my panel dataset seper…
Year dummys and age in Anderson-Hsiao first differenced modelDear Stata forum! I´m writing a thesis on the causal mechanism of health and socioeconomic position…
Saving beta coefficients, constant and residuals from linear regression models? Is this code correct?Hi, I am trying to save beta coefficients, constant and residuals and need advice if the following p…
graphical markersDear All, I have this graph Code: * Example generated by -dataex-. To install: ssc install dataex c…
Continuous data with lots of zerosHello I want to analyse a dependent variable (donations) as a function of some variables. The donat…
Subscribe to:
Post Comments (Atom)
0 Response to Replacing String variables with another string variable. (String variables contain data from multi select questions)
Post a Comment