Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Generate randomly mutliple binary variables


From   Ulrich Kohler <[email protected]>
To   [email protected]
Subject   Re: st: Generate randomly mutliple binary variables
Date   Wed, 27 Oct 2010 16:59:10 +0200

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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index