Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: st: Programming in stata: how to generate a sample following abivariate distribution


From   Arun Rajamohan <[email protected]>
To   [email protected]
Subject   st: Re: st: Programming in stata: how to generate a sample following abivariate distribution
Date   Mon, 27 Aug 2007 13:48:34 -0400

Try this,

findit rnd
help rnd

It can generate binomially distributed random numbers

//
Random number generators
------------------------

         Student's t:   rndt obs df

          Chi-square:   rndchi obs df

                   F:   rndf obs df_n df_d

          log normal:   rndlgn obs mean var

             Poisson:   rndpoi obs mean
                        rndpoix [ mu ]

            binomial:   rndbin obs prob numb
                        rndbinx [ prob ] den
//

Hope it helps...
-A


On Aug 27, 2007, at 12:41 PM, Vieira, Cecilia wrote:

Hi all,
I need to generate a sample from scratch: 150 observations following a binomial
distribution with p=10% chance of success.
Which command should I use? Any suggestions about references I could use? I had
no luck with the stata help.
Thank you,
Cecilia


The information transmitted in this electronic communication is intended only for the person or entity to whom it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this information in error, please contact the Compliance HelpLine at 800-856-1983 and properly dispose of this information.


*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Arun Rajamohan PhD
Department of Biology
Room 237, Biological & Geological Sciences Building
1151 Richmond Street North
The University of Western Ontario
London, ON N6A 5B7 CANADA

Tel: + 1-519-661-2111 ext 80582
Fax: + 1-519-661-3935
[email protected]
http://homepage.mac.com/arunrajmohan/

Other contact numbers:
Home: 5192047680 / Cell: 5198511553
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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