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

st: Re: Re: Finding and tagging overlapping groups


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   st: Re: Re: Finding and tagging overlapping groups
Date   Fri, 29 Jul 2005 20:00:27 -0400

Just a quick note about the code I posted. It may not work if the two variables keep expanding into other values for the opposing variable more than the 4 lines (two repetitions) now cover in this part of the code.

bysort `done' `v2' (`gen'): replace `gen'=`gen'[1]
bysort `done' `v1' (`gen'): replace `gen'=`gen'[1]
bysort `done' `v2' (`gen'): replace `gen'=`gen'[1]
bysort `done' `v1' (`gen'): replace `gen'=`gen'[1]

You could add an inner loop with a count command to see if any values changed from the replace command and then keep going until no changes occur. Or, you could just copy these lines over again a few times in the loop to hopefully cover any actual data complexity.

Michael Blasnik
[email protected]


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