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

Re: st: Simultaneous occurance

From   Richard Goldstein <>
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


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,
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index