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)
How to export variable labels using outreg2 - label option not working?Hi all I want to export my regression tables, showing variable labels instead of names, using the o…
A note: fileread() assigning binary string scalarsAn observation after failing to read a Stata scalar using Stata Python sfi Scalar getString(); The s…
Use global macro to call do-file not errorDear All, I'm trying to use the following code to set up global macro and then call do file based o…
ML command could not find feasible valuesDear STATA experts: I’m learning STATA's maximize likelihood syntax by building my own ordered prob…
Interpreting Oaxaca DecompositionHello everyone, I am using Oaxaca decomposition for my graduation project, where the subject is wag…
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