Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: obtaining a new file with all possible combinations?


From   "G. ter Riet" <G.terRiet@amc.uva.nl>
To   statalist@hsphsun2.harvard.edu
Subject   st: obtaining a new file with all possible combinations?
Date   Fri, 30 Sep 2005 23:43:24 +0200

Dear list members,
For 80 observations, I have information on 3 binary (0,1) variables. 
I'd like to get a file containing all possible combinations 
(80*80*80=512000). So, let's say I had
_n var1 var2 var3
1   a    b    c
2   d    e    f

and I need a data file that contains

1   a    b    c
2   a    b    f
3   a    e    c
4   a    e    f
5   d    b    c
6   d    b    f
7   d    e    c
8   d    e    f

How may this be accomplished?
Kind regards
Gerben ter Riet, Dept General Practice, AMC Amsterdam, NL
begin:vcard
n:ter Riet;Gerben
fn:Gerben ter Riet
tel;fax:+31 20 5669186
tel;work:+31 20 5664640
org:Academic Medical Center;General Practice
adr:;;Meibergdreef 15, Room J2-118;Amsterdam;;1105 AZ;The Netherlands
version:2.1
email;internet:g.terriet@amc.uva.nl
title:Associate Professor
end:vcard




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