From | Fred Wolfe <[email protected]> |
To | [email protected] |
Subject | Re: st: Speaking Stata: by varlist |
Date | Sat, 22 Jun 2002 15:36:39 -0500 |
At 11:49 AM 6/22/2002 -0400, you wrote:
Dear Statalisters,One explanation is that your code:
In Stata, the
bysort varlist: list varlist if _N>1
is supposed to find duplicates with respect to the bysort varlist.
I have a data set, and I know by the ID variable there is no duplicates, because if I use
bys ID: gen count=_N
tab count
I get count all equal to 1.
However, if I use
bys ID: list varlist if N>1
Stata starts to list every observation from the top.
Why is this happening?
© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |