Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: "dyadic" data


From   "Scott Merryman" <smerryman@kc.rr.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: "dyadic" data
Date   Wed, 9 Feb 2005 07:46:13 -0600

Anne,

Here is one way:

keep if mod(_n,2) == 1

Hope this helps,
Scott


> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Anne-CÚlia Disdier
> Sent: Wednesday, February 09, 2005 7:07 AM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: "dyadic" data
> 
> Dear all,
> I`ve the following "dyadic" dataset (where var1 and var2 are string
> variables):
> 
> var1   var2
> a      b
> b      a
> a      c
> c      a
> b      c
> c      b
> 
> In my case, ab and ba, ac and ca, bc and cb are the same observations. I
> just
> want to keep one of the two observations (for example ab, bc, ac). How can
> ask
> Stata to delete the second observation (ba, cb, ca)
> 
> Many thanks for your answer!
> Anne
> 




*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index