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)
Graph of event study with interaction termDear Clyde and All, I would like to graph an event study with an interaction term. I am performing …
Recoding variables with a loop - 2020 challengeHi, My panel data set has three different variables and I must do a similar treatment on them, they…
Out of sample prediction for a logit model with dummy for time effectI have a panel data which I would like to fit a logit/xtlogit for it. I added i.year as time dummies…
Count variables without missings in rowHi, I have a panel data set and would like to count the number of "id"s that do not have any missin…
How to change year in wrong date due to data errorHello Is there anybody that can help me with a replace syntx for changing wrong years in a date var…
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