Hello everyone.
I am trying to replace the values in an old variable with ones from a new variable. The new variable only appears in the dataset if a person wants to update their information otherwise there will be no variable generated. This new variable takes on the same name as old variable but ends with a suffix '_n'.
Example:
Old variable: education
New Variable: education_n
The idea is that if the dataset has the occurrence of a new variable, then replace values of old one with new one for all non-missing occurrences. This is more like automating a task so that I do not have to manually enter the variables each time.
Related Posts with Replacing values in a variable
coefplot graph, symmetry between dotsDear Statalisters, I am using the coefplot command to create one graph with coefficients from 40 di…
Interpreting Xtabond2 Coefficients & Coefficient Inflation?Hi, This is a follow-up question for this topic, but because the question is different, I thought m…
How to look at regression between score bandsHi, I have a binary variable and a score variable. I want to look at the binary variable in differen…
bayesgraphs diagnostics in Item Response ModelPlease, how do we use bayesgraphs diagnostics command in Item Response Model? Thanks for your antici…
How to generate predicted wage (gap) with margins command and plot a profile with marginsplotDear Stata user, I would like to have predicted mean immigrant-native wage gaps on the vertical axi…
Subscribe to:
Post Comments (Atom)
0 Response to Replacing values in a variable
Post a Comment