Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: how to capture data (ID's) for use in macros


From   "Jason Ferris" <[email protected]>
To   <[email protected]>
Subject   st: how to capture data (ID's) for use in macros
Date   Tue, 13 May 2008 09:58:46 +1000

Is there a way to capture data, that is similar to r(varlist)?
For example I have found repeated ID's in 1 dataset of which I want to delete from 5 datasets.
The code to find these for example:
egen tag=tag(id)
tab id if tag==0

id�������� Freq.��� Percent Cum.
4��������� 1��������� 25.00��� 25.00
9��������� 2��������� 50.00��� 75.00
21������� 1��������� 25.00��� 100.00
Total���� 4��������� 100.00

I would like the data 4, 9, 21 to be captured in a macro to be used later (i.e., to delete from other datasets). 
I am using Stata 10 on Dell intel duo.

Cheers
Jason

Jason Ferris, BPsych(Hons) MBiostat
Research Officer
Australian Research Centre in Sex, Health and Society
Level 1
215 Franklin St
Melbourne VIC 3000
P: 61 (0)3 9285 5282
F: 61 (0)3 9285 5220


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