Statalist The Stata Listserver


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

st: pairwise dummy variables


From   Serguei Kaniovski <[email protected]>
To   [email protected]
Subject   st: pairwise dummy variables
Date   Wed, 03 May 2006 10:48:12 +0200

Hi all,

I am new to STATA and have the following problem. I would like to compute the frequencies of occurrence (and counts) of all possible voting arrangements between voters "voter_id" in a voting body "body_id". The vote is a binary variable indicating the yes and no votes. Given each voter's "vote", there would be nC2-1 such arrangements. The data looks as follows:

body_id,voter_id,vote
1,1,1
1,2,0
1,3,1
1,7,1
1,9,0
2,1,1
2,2,0
2,7,0
...
So, for each "body_id", I want to know often each pair of voters in that body both voted "1", one voted "1" while the other voted "0", and both voted "0".

The dataset is quite large.

Would appreciate your help,
Serguei
--
___________________________________________________________________

Austrian Institute of Economic Research (WIFO)

Name: Serguei Kaniovski P.O.Box 91
Tel.: +43-1-7982601-231 Arsenal Objekt 20
Fax: +43-1-7989386 1103 Vienna, Austria
Mail: [email protected]

http://www.wifo.ac.at/Serguei.Kaniovski

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