Statalist


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

RE: st: Data Management


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: Data Management
Date   Fri, 21 Nov 2008 17:40:33 -0000

/// 
Why imagine? Why not try it? 

The help on -duplicates- explains that you can look for -duplicates- on
precisely as many variables as interest you, even one. -duplicates- is
not limited to detection of duplicate observations, and never was. 

In this case it is rather a backwards approach to the problem as your
concern is with different values, but also valid. You could 

. duplicates tag id city, gen(tag)  

and then look at observations not tagged as those that interest you. 

. list id city if tag == 0 

However, as you should be able to get to the same point directly without
using -duplicates-, it offers no advantage here (and  no disadvantage
either). 

Nick 
[email protected] 

Rijo John

 I am not sure if duplicates command will work.. Because I have other
variables in the data. So there are actually no duplicates at all in
the data. Only the city name variable is spelt differently in certain
cases. There are many other variables which takes different values for
year 1 and two. So if I issue a duplicate command I would imagine it
may not produce any duplicates at all.


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index