Nick thanks a lot.that's very useful.
Dev
>>> [email protected] 12/15/03 04:56pm >>>
(Please use informative titles for your postings.)
Stata 8 includes an official general-purpose command
called -duplicates-.
In your case, I am not clear whether
time order is important, i.e. duplicates
must be similar to each other _and_
adjacent in time. I'll guess not.
. duplicates report a b c
is one starting point.
If you do not have Stata 8,
. findit duplicates
finds some alternatives.
Nick
[email protected]
Dev Vencappa
>
> I have the following problem. Suppose I have 100 different
> variables named differently. Suppose a b c are three of the
> variables and I sort the data by a b and c. Because I
> appended several datasets, I want to check for duplicate
> values,ie count if a==a[_n-1] & b==b[_n-1] & c==c[_n-1] and
> so on. However if I have hundreds of other variables in the
> data set, is there a shorter way of asking Stata to check
> varX==varX[_n-1] rather than typing each individual
> variables separately, noting that the condition has to be
> checked against the same variable's lagged value? I am not
> sure the use of * is of help here. Can anyone help please?
>
*
* 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/
*
* 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/