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/