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]

Re: st: Generate randomly mutliple binary variables


From   Ulrich Kohler <kohler@wzb.eu>
To   statalist@hsphsun2.harvard.edu
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index