Hello, I have searched for an answer to this simple question on previous forums, and cannot find the specific situation I am hoping to rectify.
I am looking to detect duplicates, but they will be found inverted over two columns, so it is not the typical "duplicate" usually referred to in Stata. As an example:
Obs Var1 Var2
1 A B
2 B A
3 A C
4 C A
(This is a simplification of the content of the cells.)
I need Stata to let me know when 2 and 4 occur, because I need to delete them. They are in String format. I have tried identifying them with loops over levelsof locals but I cannot seem to get the right identification of repeated content).
Thank you.
Related Posts with Detecting inverted duplicates over two columns
DEA with loopSuppose I have a set of 100 hospitals and each hospital has an observation for four years. I want to…
optimizeHi All, I have a big dataset (2432rows with 6 variables) looks like below. I would like to minimize …
Extreme values in upper/lower bound bands not in original dataI want to create a graph with upper/lower bound bands - using this code (similar to that used here U…
Issues with running stata code for cnormI have issues running the stata code for cnorm as shown below, is there any way to resolve this issu…
Generating new variable in a panel dataset with values of first time periodHi everyone! Apologies for the vague title. I have a variable (URBAN) that defines each village (IDP…
Subscribe to:
Post Comments (Atom)
0 Response to Detecting inverted duplicates over two columns
Post a Comment