Hi,
I am updating and replace non-missing values in a master data set with non-missing values in the using data set. As an example, let's say I have 10 variables var1-9 with 20 observations and one of the variables, let's call it ID, is unique and non-repeating. I updated and replaced var1, var2, var3 for 3 observations, i.e. 3 of the ID variables. I got the _merge == 5 result I expected and I double-checked the new data set only had these 3 variables replaced for these 3 observations. However, I had to check in Excel. Is there a command to return only the observations that were changed?
Will return all 10 variable names (and values) for the 3 observations changed. I am just trying to get the output of var1, var2, var3 that were changed with -update, replace-. Could not find anything by searching old threads.
Thank you!!
I am updating and replace non-missing values in a master data set with non-missing values in the using data set. As an example, let's say I have 10 variables var1-9 with 20 observations and one of the variables, let's call it ID, is unique and non-repeating. I updated and replaced var1, var2, var3 for 3 observations, i.e. 3 of the ID variables. I got the _merge == 5 result I expected and I double-checked the new data set only had these 3 variables replaced for these 3 observations. However, I had to check in Excel. Is there a command to return only the observations that were changed?
Code:
list if _merge == 5
Thank you!!
Comment