Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Repeated matching of variables


From   Jingjing Xia <jingjinx@usc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Repeated matching of variables
Date   Sun, 28 Jul 2013 11:12:17 -0700

Hi Statalist~

I want to repeatedly match variable "id" to "date" by "Group", but can't figure out how to exactly to it....To be more specific:

My dataset is in the format:

Group1  id1  date1
Group1  id2  date2   
Group1  id3  date3   

Group2  id4  date4
Group2  id5  date5
Group2  id6  date6

And I want to have something like this:

date1 id1
date1 id2
date1 id3
date2 id2
date2 id3
date3 id3

date4 id4
date4 id5 
date4 id6
date5 id5
date5 id6
date6 id6

Can anyone help? Thank you so much!

Best
Jingjing
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index