See -levelsof-
-levelsof id if tag ==0, local(levels)-
Scott
On Mon, May 12, 2008 at 6:58 PM, Jason Ferris <[email protected]> wrote:
> 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/