Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: help


From   "Dev Vencappa" <[email protected]>
To   <[email protected]>
Subject   Re: st: help
Date   Mon, 15 Dec 2003 16:43:43 +0000

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?

Many thanks
Dev




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