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
sample size calculationHello everyone, A friend of mine is asking me to calculate for her the sample size for an experiment…
invariant regressorsDear all, I can't understand what's going on.. I have panel data and when i run BE in stata, indivi…
deflate data using 1980 valueDear All, I found this question here (http://bbs.pinggu.org/forum.php?mod=...a=#pid55243106). The da…
replacing missing data with mean or medianHi guys, i have a set of data (n=586) with 2 variables. in some of the variables i have 2 to 3% miss…
Diff in Diff with different timesDear Statalisters, I am studying the following question: "What is the impact of distributing divide…
Subscribe to:
Post Comments (Atom)
0 Response to Replacing values in a variable
Post a Comment