<>
Sounds like -egen, group()-...
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jean-Benoit
Hardouin
Sent: Samstag, 5. Dezember 2009 13:45
To: [email protected]
Subject: st: convert decimal number in binary format
Dear all,
I search an idea to create variables which represents all the possible
pattern of responses to a set of binary variables, for example with 3
variables :
var1 var2 var3
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
I have searched a command to convert a decimal number in binary format (here
the responses patterns represents the number from 0 to 7 in binary format)
but I have not find any such command.
I have no simple idea to create such variables (I want to create a programme
where the number of variables is not fixed and can be large).
Has someone an idea to help me ?
Best,
Jean-Benoit
--
Jean-Benoit Hardouin, PhD
Maitre de Conférences - Assistant Professor
EA 4275 "Biostatistics, Clinical Research and Subjective Measures in Health
Sciences"
http://www.sante.univ-nantes.fr/biostat/
Departement of Biomathematics and Biostatistics
Faculty of Pharmaceutical Sciences
University of Nantes
1, rue Gaston Veil - BP 53508
44035 Nantes Cedex 1 - FRANCE
Email : [email protected]
Personal website : http://www.anaqol.org
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/