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
High R-square in ppmlHi statalist, I would like to clarify few things about using ppml on gravity data. 1. I'm trying t…
Outreg2 Not WorkingHi there! I have been using the following codes. Code: reg y x1 x2 x3 x4, r Outreg2 using myreg.doc…
Counting readmission rate from the index dateI have the below data fields. How to count the number of admissions pre 30 days and post 30 days fro…
How to show the unique value of a characteristic variable in panel data?I am having a panel data with the unit is firms in 65 countries around the world with the time serie…
Suest and r-squared?Hi, Does anybody know if there is an option to show the r-squared with suest? And if not, is there …
Subscribe to:
Post Comments (Atom)
0 Response to Replacing values in a variable
Post a Comment