Kit Baum wrote:
> It is useful to note that a binary variable of this sort is the
> intersection of the sets defined by each dummy. Intersection of sets
> in binary arithmetic is done by multiplying, or with the AND operator
> (&). The union of sets -- true if either is true -- is done with the
> OR operator (|). Stata does not contain an exclusive OR operator
> (XOR), but one can readily be fashioned by adding the dummies:
>
> gen xor12 = cond(dum1+dum2==1, 1, 0)
Thanks a lot for this - I'll try this out as well.
CLIVE NICHOLAS |t: 0(044)7903 397793
Politics |e: [email protected]
Newcastle University |http://www.ncl.ac.uk/geps
Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather
conditions.
*
* 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/