Statalist


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

st: How to sample from a Multinomial distribution


From   [email protected]
To   [email protected]
Subject   st: How to sample from a Multinomial distribution
Date   Wed, 27 Feb 2008 15:41:39 -0300 (BRT)

Dear Statalisters,

I have to generate data for a sample, which has three groups (G1, G2 and
G3). In this respect,  the probability distribution for the G1, G2 and G3
follows a multinomial distribution with parameter vector P = (pG1 ,pG2
,pG3 ).

I have used -genbinomial- to generate the first two groups, and then the
last one is calculate by subtraction. Since this is not an elegant way to
do that, is the any routine that does in Stata the task above mentioned ?
I have not found anything yet.

Thanks in advance!

Tiago


*
*   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