Hi,
I have tried to google my best and search the forum but I can't seem to find something regarding my (very simple, I'm afraid) problem.
I have a large dataset where some observations have the same ID-number (aka one patient have two observations). To find these, I have used the duplicates command, and created a new variable:
I have found 150 duplicates.
I would now like to create a table with the duplicates (I figured I could do that by using the new tags-variable) and the date (variable DATE) the observation was made, creating a table with the ID_CODE and DATE of all duplicates displayed.
Sadly, my Stata-knowledge doesn't seem to get me there
Any advice would be greatly appreciated!
I have tried to google my best and search the forum but I can't seem to find something regarding my (very simple, I'm afraid) problem.
I have a large dataset where some observations have the same ID-number (aka one patient have two observations). To find these, I have used the duplicates command, and created a new variable:
Code:
duplicates tag ID_CODE, generate(tags)
I would now like to create a table with the duplicates (I figured I could do that by using the new tags-variable) and the date (variable DATE) the observation was made, creating a table with the ID_CODE and DATE of all duplicates displayed.
Sadly, my Stata-knowledge doesn't seem to get me there
Any advice would be greatly appreciated!

Comment