Sending emails by replying to others' posts without 
deleting them is poor practice. Although that should 
be self-evident, it is explicitly advised against 
in the Statalist FAQ. 
Also, Clive Nicholas replied promptly to your posting 
yesterday and made a suggestion. If that suggestion is not what you 
want, you should explain why not, not just repeat the original post. 
Like others, I find it impossible to decode precisely 
what you want here, but in addition to Richard Williams' 
suggestion, -statsby- is another guess in the dark. 
Nick 
[email protected] 
sarah smith
 
> I wonder how I can compare the values of a variable, say var1, at
> different observations? (In particular I want to do regressions such
> as the one below)
> 
> if var1(at line 2) = var1(at line 10 ) {
> 
> regress y x in 2/10
> }
*
*   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/