Statalist


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

st: RE: Simultaneous occurance


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

Try this:


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

Fon: 0049-7071-2978184

Home: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1130

Publications: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1131

SSRN: http://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=669945

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Olga Lyashevskaya
Sent: Tuesday, March 18, 2008 4:56 PM
To: [email protected]
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,
Olga


  


 
____________________________________________________________________________
________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
*
*   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/

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