Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: re: basic monte carlo simulation


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: re: basic monte carlo simulation
Date   Sat, 21 Feb 2009 10:52:22 -0500

<>
William said

Non-transitive dice would be something like:

    * die A has sides {2,2,4,4,9,9},
    * die B has sides {1,1,6,6,8,8}, and
    * die C has sides {3,3,5,5,7,7}.

A is likely to be higher than B
B is likely to be higher than C
C is likely to be higher than A

--------------
clear
set obs 10000
g un1 = runiform()
g firstdice=cond(un1<`=1/3', 2, cond(un1<`=2/3', 4, 9 ))
prop firstdice
--------------

likewise for second and third.


Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index