Dear All,
I am a long data, with duplicated IDs, as there are obs for different dates. I would like to check if there are difference between the variables for each ID and Date (as my title say: duplicates without perfectly duplicated obs)
I have tried to use duplicates, but I have more than 40 variables, so it is practical to use
I have also tried to use collapse (checked the help in stata) but don't know if its the correct way to go.
Thank you for your help in advance.
I am a long data, with duplicated IDs, as there are obs for different dates. I would like to check if there are difference between the variables for each ID and Date (as my title say: duplicates without perfectly duplicated obs)
Code:
input id date char1 char2 char3 char4 1 1/1/2009 4 5 4 0 1 2/22009 4 5 5 10 1 3/3/2009 4 5 4 10 1 4/4/2009 4 5 4 10 1 5/5/2009 4 5 4 10 end
I have also tried to use collapse (checked the help in stata) but don't know if its the correct way to go.
Code:
ds date, not collapse (lastnm) `r(varlist)', by(date)
Comment