Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Generate randomly mutliple binary variables


From   Fabien Bertho <fabien.bertho@sciences-po.org>
To   statalist@hsphsun2.harvard.edu
Subject   st: Generate randomly mutliple binary variables
Date   Wed, 27 Oct 2010 17:13:38 +0200 (CEST)

Many thanks for this.



> ----------------------------------------
> From: Ulrich Kohler <kohler@wzb.eu>
> Sent: Wed Oct 27 16:59:10 CEST 2010
> To: <statalist@hsphsun2.harvard.edu>
> Subject: Re: st: Generate randomly mutliple binary variables
> 
> 
> . gen x = floor(runiform()*4)*2
> 
> 
> Am Mittwoch, den 27.10.2010, 16:44 +0200 schrieb Fabien Bertho:
> > Hi,
> > 
> > I would like to generate randomly a "multiple binary variable" - i.e. a variable that takes the value 0, 2, 4 or 6.
> > How can I do?
> > 
> > Fabien
> > 
> > --------------------------------------------------------------------------
> > Tous les courriers électroniques émis depuis la messagerie
> > de Sciences Po doivent respecter des conditions d'usages.
> > Pour les consulter rendez-vous sur
> > http://www.ressources-numeriques.sciences-po.fr/confidentialite_courriel.htm
> > 
> > *
> > *   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/


--------------------------------------------------------------------------
Tous les courriers électroniques émis depuis la messagerie
de Sciences Po doivent respecter des conditions d'usages.
Pour les consulter rendez-vous sur
http://www.ressources-numeriques.sciences-po.fr/confidentialite_courriel.htm

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


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