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

st: RE: Simultaneous occurance

From   "Martin Weiss" <>
To   <>
Subject   st: RE: Simultaneous occurance
Date   Tue, 18 Mar 2008 17:28:29 +0100

Try this:

set obs 1000
g byte var1=1 if uniform()<0.7
replace var1=0 if var1==.
g byte var2=1 if uniform()<0.5
replace var2=0 if var2==.

g byte indicator=var1==1 & var2==1 | var1==0 & var2==0

ta var1 var2 if ind==0
ta var1 var2 if ind==1

Martin Weiss

Diplom-Kaufmann Martin Weiss
Mohlstrasse 36
Room 415
72074 Tuebingen

Fon: 0049-7071-2978184




-----Original Message-----
[] On Behalf Of Olga Lyashevskaya
Sent: Tuesday, March 18, 2008 4:56 PM
Subject: st: Simultaneous occurance

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,


Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.
*   For searches and help try:

*   For searches and help try:

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