Statalist


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

st: RE: question regarding merging


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: question regarding merging
Date   Thu, 16 Jul 2009 23:28:44 +0200

<>

bys id: keep if _N==5



HTH
Martin

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Debs Majumdar
Sent: Donnerstag, 16. Juli 2009 23:25
To: statalist@hsphsun2.harvard.edu
Subject: st: question regarding merging

Hi,

 I am new to stata and was trying to figure out the best way to solve the
following question.

 I have a dataset with id's of school children and their demographics at 5
time points.

The 1st timepoint has 800 id's, the second has 650,...the last one has 325
id's. Some id's are common to all timepoints.

How do I create a dataset which will have only those id's which are present
at all time points? I have created a variable 'time' which corresponds to
the # of id's at each point and I tried with breaking up the dataset into 5
datasets(one for each timepoint) and merging them using nokeep but that
didn't work.

Thanks,

     Debs


      


*
*   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/


*
*   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   |   What's new   |   Site index