Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Simultaneous occurance


From   Richard Goldstein <[email protected]>
To   [email protected]
Subject   Re: st: Simultaneous occurance
Date   Tue, 18 Mar 2008 11:59:08 -0400

use egen newvar=rowtotal(var1 var2)

newvar will be 0 if both are 0 (or both missing)
newvar will be 2 if both are 1

Rich

Olga Lyashevskaya wrote:
Dear all,

There are two binary variables in my sample, where 1
is presence and 0 is absence of the particular
characteristic. I want to identify those cases where I
get either both 0's or both 1's

Any suggestions?

Thank you in advance,
Olga
*
*   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