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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: list duplicates but within subgroups


From   Michael Costello <michaelavcostello@gmail.com>
To   statalist <statalist@hsphsun2.harvard.edu>
Subject   st: list duplicates but within subgroups
Date   Fri, 31 Dec 2010 02:56:18 -0500

Folks,

I have a poorly coded dataset that was typed from several thousand
paper surveys.  Often a stack of surveys would be entered into the
computer and then later entered again because of poor record keeping.
Each survey has two variables of interest, school_code and id.
Neither is unique, but there should be only one of each id in each
school_code.  For example, I should not have two children at
school_code=10 who both have the same id number, yet there will be
students at every school who have id=1, 2, etc.

I'm trying to find a command that uses some kind of subgroup option
for a -duplicates list- command.  I've tried all the easy ones
("duplicates list id, by school", "duplicates list id, over school",
"duplicates list id, sepby(school_code)" ) all with no luck.  Does
anyone have any ideas of commands, macros, or websites that might help
me with this?  Thanks for your help.
--
Michael Costello
RTI International
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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