Statalist


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

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


From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   Re: st: Programming in stata: how to generate a sample following a bivariate distribution
Date   Mon, 27 Aug 2007 13:26:47 -0400

Cecilia <[email protected]>:
-help generate- links to -help random_number_functions-
and if you want success coded 0/1 you might try:

clear
set seed 12345
set obs 150
gen success=(uniform()<.1)

On 8/27/07, Vieira, Cecilia <[email protected]> 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
>
*
*   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