I was wondering if there is a way to merge identical observations & then create a new variable containing the non-matching observation e.g. "2" and "3" below.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str10 ID str9 var1 str8 var2 str10 var3 str5 var4 str15 var5 "Id1" "a" "b" "c" "d" "2" "Id1" "a" "b" "c" "d" "3" end
input str10 ID str9 var1 str8 var2 str10 var3 str5 var4 str15 var5 str15 newvar
"Id1" "a" "b" "c" "d" "2" "3"
0 Response to Merge and create new variable for the non-matching observations
Post a Comment