Statalist


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

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


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: how to capture data (ID's) for use in macros
Date   Tue, 13 May 2008 14:40:57 +0100

In addition, it seems from Jason's post that he should know about
-duplicates-. 

Nick
[email protected] 

Scott Merryman

See -levelsof-

-levelsof id if tag ==0, local(levels)-


Jason Ferris

> 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.

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