Not the issue at all. Check out 
FAQ     . . . . . . . . . . . . . . . . . . . . .  if command vs. if
qualifier
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  J.
Wernow
        6/00    I have an if command in my program that only seems
                to evaluate the first observation, what's going on?
                http://www.stata.com/support/faqs/lang/ifqualifier.html
Nick 
[email protected] 
Ilona Carneiro
I'm using `touse' as this is my understanding of what I need to do to  
make the programme "byable", and my understanding is that using "if  
`touse' {" should restrict the subsequent code to the 'by' variable,  
e.g. for the 1st individual, the programme should be run just for that  
individual, etc. Clearly that is not happening.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/