Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: how to drop duplicate values

From   Malin Lundberg Rasmussen <>
To   "''" <>
Subject   st: how to drop duplicate values
Date   Fri, 14 Sep 2012 13:53:38 +0200

My problem:
I have a cohort of patients with a severity grade for each eye. I am only going to use one eye, and I want it to be the eye with a certain grade, say 2.
I have made the variable long, so the data looks like this:

1. id:1 var*:2
2. Id:1 var*:2
3. Id:2 var*:2
4.Id2: var*:3

I use the command 
                             Keep if var*==2
But then I have some patients who have the same grade in both eyes. 

1. id:1 var*:2
2. Id:1 var*:2
3. Id:2 var*:2

How do I drop these? (in the above list 1 or 2).

Hope anyone has the answers?!

Best regards
Malin Rasmussen

Med venlig hilsen 

læge, ph.d.-studerende
Malin Lundberg Rasmussen
Øjenafdeling E, OUH

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index