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
Do you need to use the same number of data observations for different types of regression?Hello, I want to perform a linear (1 independent variable) and a multiple regression with a sample …
regression on continuous outcome variable paired match case control studyre We have done a cross-sectional survey of disease X in cattle. Seropositives were matched to seron…
Generate spatial weight matrix by using "spweight"Hi everybody, I am working on Emad A. Shehata's spatial command modules, but I got a trouble in cre…
Grs testHi Statalist Members! I am conducting a research on variation of the average returns on 12 portfoli…
M Jones ModelHi,Is the following code true for the m jones model? data: 2010-2017 for 35 country and 24 industry …
Subscribe to:
Post Comments (Atom)
0 Response to Replacing values in a variable
Post a Comment